TextBox Accessing Contents

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I access the contents of a Text box (that is a drawing object shape on
a worksheet).

For example I wish to manipulate the text a user has typed into the box, and
edit/change the contents of the box.

I cannot find a property such a Text or Value, that I use for UserForm
controls.

Thanks
 
Hi,

This will replace current contents with "My Text".
You will need to adjust how you reference the control. The examples use name
and index.

Activesheet.shapes(1).textframe.characters.text="My Text"
or
Activesheet.shapes("Text Box 1").textframe.characters.text="My Text"

Cheers
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top