View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Krygim Krygim is offline
external usenet poster
 
Posts: 2
Default Reference to free-form textboxes

Hi Joel and Per,

Thanks for your response. I tried the following command in the Immediate
window of Excel:
ActiveWorkbook.Sheets(1).TextBox1.Value="Some Value"

I got the error message: "Method or data member not found"
I have already named "Text Box 1" as "Textbox1"

But the following command was okay:
ActiveWorkbook.Sheets(1).Range("A1").Value="Some Value"

Any idea?

KM


"Joel" wrote in message
...
oExcel.ActiveWorkbook.Sheets(1).TextBox1.Value="So me Value"


"Krygim" wrote:

I insert a text box into Sheet1 of Excel and want to assign a value to
this
text box via Excel automation from another program. I have tried the
following syntax without success:
oExcel.ActiveWorkbook.Sheets(1).Textboxes("TextBox
1").Value="Some
Text"

What is the correct syntax (or object path) to refer to this text box?

Thanks in advance.
KM