Changing a formula inside a textbox - Excel 2007
- From: benspain_uk@xxxxxxxxxxx
- Date: Wed, 9 Jan 2008 06:36:59 -0800 (PST)
I am trying to find a way to change and view the formula inside a
textbox on a work*** using VBA within Excel 2007.
In 2003 I use:
strButtonFormula = ws***.TextBoxes(strButtonName).Formula
and
ws***.TextBoxes(strButtonName).Formula = "=A1"
Nice and easy, and I have no issues.
However in 2007 - it doesn't like this code, and I can't find a way to
use "shapes" to get the same thing. I can get the text (i.e.
ws***.Shapes(strButtonName).TextFrame.Characters.Text), but not the
formula.
Also, when I record a macro in 2007, I get "ActiveCell.FormulaR1C1 =
"R1C1"", however this just doesn't work - it changes the last selected
cell, not the textbox!
Any ideas?????
.
- Follow-Ups:
- Re: Changing a formula inside a textbox - Excel 2007
- From: JE McGimpsey
- Re: Changing a formula inside a textbox - Excel 2007
- Prev by Date: Re: Extract rows to different sheets
- Next by Date: Re: Extract rows to different sheets
- Previous by thread: Re: Extract rows to different sheets
- Next by thread: Re: Changing a formula inside a textbox - Excel 2007
- Index(es):