View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Reference to free-form textboxes

Hi

I assume that the workbook holding the textbox is the active workbook.

oExcel.ActiveWorkbook.Sheets(1).TextBox 1.Value="Some Text"

Regards,

Per

"Krygim" skrev i en meddelelse
...
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