How to insert text to a (worksheet) textbox using VBA in Excel? -


i have inserted text box in worksheet, using menu "insert/text box" @ ribbon of excel 2007. has automatically been named "textbox 17". trying set value using vba code, can't figure out way it. tried run single-line routine feed textbox text (like following , other combinations) failed.

sub test()     sheets(1).shapes.item(14).text = "eventually text"     sheets(1).shapes(14).text = "eventually text"     worksheets(1).shapes(14).value = "eventually text"     sheets(1).shapes("textbox 17").text = "eventually text"     sheets(1).shapes("textbox 17").controlformat.value = "eventually text"     worksheets(1).shapes(14).textframe.textrange.text = "eventually text" end sub 

while in research this, found answers activex textboxes. far understood, textbox have inserted not of kind.

can help?

this seems working no problem:

sheets(1).shapes(14).textframe.characters.text = "xxx" 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -