Thread: Text Box Value
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
jayklmno jayklmno is offline
external usenet poster
 
Posts: 58
Default Text Box Value

I figured out how to select the textbox using...
Sheets("Survey").Shapes("TextBox1").Select

and how to change the text in the box...
Sheets("Survey").Shapes("Text Box 125").Characters.Text = "test"

But how do I pull the value from the box...

"jayklmno" wrote:

Two Possible answers to this one that will solve my problem... one from
Excel, one from VBA.

From Excel, is there a formula that will link a cell to a text box value?
-- If the value of "TextBox1" is "Test", is there a way to send this value
to cell A1.

From VBA, how do you refer to a text box from VBA?
-- I tried Sheets("Survey").TextBox(tbox) where tbox is a string with the
TextBox's name ("TextBox1" which changes with each text box). This returns an
error.

Thanks for your help :)