Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested formula to search a text string and return specific text Barbie Excel Worksheet Functions 10 February 21st 09 07:40 AM
How to search a worksheet for text-value matches? AdanaDarke Excel Worksheet Functions 2 January 3rd 08 06:44 PM
Search, find or lookup defined text in text string zzxxcc Excel Worksheet Functions 9 September 6th 07 09:37 PM
Refference Unbound Text Box [email protected] Excel Programming 1 October 30th 05 07:20 PM
Find / Search for text boxes in a worksheet John Ellis Excel Programming 18 October 25th 04 04:03 PM


All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"