LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ron ron is offline
external usenet poster
 
Posts: 118
Default Text Box Question

I have several text boxes on a worksheet that I'd like to loop through
and collect the input.

my_info=activesheet.textbox1

collects the information in textbox1. The following loop successfully
collects the data from all 6 text boxes.

n = 0 ' array is option base 0
For x = 1 To 6
my_info = ActiveSheet.OLEObjects("TextBox" & x).Object
ReDim Preserve retire_array(n)
info_array(n) = yy
n = n + 1
Next

My question is, is there a more concise construction then "my_info =
ActiveSheet.OLEObjects("TextBox" & x).Object" that I could use? I've
tried things like

my_info = activesheet.textbox(x)
my_info = activesheet.textboxes(x).text
my_info = activesheet.textboxes(x)
my_info = activesheet.textboxes(x).text

but none of these work. Is there some short construct other than the
one above using the Objects.object approach that will work?..TIA, Ron
 
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
text format question JH Excel Discussion (Misc queries) 2 April 24th 09 06:21 PM
Text to Columns Question Dennis Excel Worksheet Functions 8 December 30th 05 12:52 PM
Text box question Greg B... Excel Discussion (Misc queries) 0 March 1st 05 07:28 AM
Text box question Greg B... Excel Discussion (Misc queries) 3 February 27th 05 02:47 PM
Text Box Question Rich Cooper Excel Programming 3 June 14th 04 11:51 PM


All times are GMT +1. The time now is 08:04 AM.

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

About Us

"It's about Microsoft Excel"