Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can I refference then search text in a worksheet text box
I have a workbook which contains multiple pages and on each page is a
"notes" section that is simply an Excel text box (created from the drawing toolbar) and I would like to write a routine that can refference the text inside of the box. Is there a way to do this? Let's say its name is "Text Box 1" I thought there would be something like TextBox1.value, Shapes("Text Box 1").text etc to refference it, but I can't figure it out. If you could help me figure out a way to pull the text in the text box into a variable or refference it somehow I think I'd have it from there. Thanks so much, Jamie |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can I refference then search text in a worksheet text box
Hi Jamie -
Here's a starting point: Sub jamie() 'Note that you have to activate the worksheet that contains the textbox 'and then select the text box before you can reference its text... this is a 'requirement of the Characters.Text (Method.Property) combination for some 'reason. Dim boxText As String Worksheets("Sheet1").Activate Worksheets("Sheet1").Shapes("Text Box 1").Select ' or .Shapes(1).Select boxText = Selection.Characters.Text MsgBox boxText End Sub --- Jay "jseven" wrote: I have a workbook which contains multiple pages and on each page is a "notes" section that is simply an Excel text box (created from the drawing toolbar) and I would like to write a routine that can refference the text inside of the box. Is there a way to do this? Let's say its name is "Text Box 1" I thought there would be something like TextBox1.value, Shapes("Text Box 1").text etc to refference it, but I can't figure it out. If you could help me figure out a way to pull the text in the text box into a variable or refference it somehow I think I'd have it from there. Thanks so much, Jamie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Nested formula to search a text string and return specific text | Excel Worksheet Functions | |||
How to search a worksheet for text-value matches? | Excel Worksheet Functions | |||
Search, find or lookup defined text in text string | Excel Worksheet Functions | |||
Refference Unbound Text Box | Excel Programming | |||
Find / Search for text boxes in a worksheet | Excel Programming |