Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making an Array of checkboxs using VB for Excel Macros

Status
Not open for further replies.

ErantD

Programmer
Mar 28, 2003
11
ES
How do I turn an Object name into an Array.
Example I ahave 10 checkboxes and I´d like to turn them into a array to use in a loop.
Note I am using Visaul Basic for EXCEL MACROS and simply copying the name or putting the name in the name type column can´t be done. How do I do this for Excel Macros???

say: (chkBox(#) being the name of the checkboxs)

the loop I want to use for exmple:
Dim i as Integer
For i= 1 to 10
chkBox(i)= i
Next i
 
could you not use something like:- (and dont quote me, i know its something like this but im not near a dev machine so i cant check)

for each checkbox in form1
'do stuff
next checkbox

like i said i cant remember the exact syntax but if you search msdn for collection(s) you should find some help!

good luck!! If somethings hard to do, its not worth doing - Homer Simpson
 
I see you've had three tries to find the right forum, and you probably haven't succeeded yet. You might try forum707 which deals specifically with VBA issues.

Read faq222-2244 before you post - it explains about not cross-posting on this site, and what to do about it
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top