Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Control array
I have several textboxes and checkboxes. I now insert them into an array but
there is something called control array? How do you use it? My help function does not work! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Control array
there is something called control array
There is in VB, but not in VBA. If you say you have them in an array now then I am not sure you can improve on that. RBS "Freddie Mac" wrote in message ... I have several textboxes and checkboxes. I now insert them into an array but there is something called control array? How do you use it? My help function does not work! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Control array
A Control Array is only available in VB6 (not VBA).
You could set up an array of With Events control class's which would lead to similar overall functionality albeit in a different way. Regards, Peter T "Freddie Mac" wrote in message ... I have several textboxes and checkboxes. I now insert them into an array but there is something called control array? How do you use it? My help function does not work! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Control array
Freddie Mac wrote: I have several textboxes and checkboxes. I now insert them into an array but there is something called control array? How do you use it? My help function does not work! Freddie are you using Excel or is this homework? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Control array
hmm dont get you...but I am using Excel. I have a userform in which a have
two rows of textboxes and one row of checkboxes. now i have inserted them in an array ang it works fine. but if a user after me wants to add boxes the array will be full and so the user must change that too. see what i mean? It would be nicer if automatically all textboxes in a certain frame etc. would belong to the same textbox array. "Scoops" skrev: Freddie Mac wrote: I have several textboxes and checkboxes. I now insert them into an array but there is something called control array? How do you use it? My help function does not work! Freddie are you using Excel or is this homework? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Control array
You've obviously read about control arrays somewhere. The problem is that
they do not exist in VBA. They exist in VB6 but not in VBA. I wasn't clear on your exact reason for using the array. There is always a work-around in VBA it just takes a little more work. For example, if I want to work my way through a group of controls then I name all of the related controls that I want to loop through like this "Control1, Control2, Control3..." Then I set up a FOR-NEXT LOOP. For each Control in (whatever object you are working with) if Control.name like "Control*" then In here I then use Strings.left or Strings.right to sequence my way through each of the ending digits. Or I use some other variation on this theme. End if It works just fine. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Control array
As others have pointed out, Excel does not have control arrays in the sense
that VB does. So how are you creating your array of textboxes? NickHK "Freddie Mac" wrote in message ... hmm dont get you...but I am using Excel. I have a userform in which a have two rows of textboxes and one row of checkboxes. now i have inserted them in an array ang it works fine. but if a user after me wants to add boxes the array will be full and so the user must change that too. see what i mean? It would be nicer if automatically all textboxes in a certain frame etc. would belong to the same textbox array. "Scoops" skrev: Freddie Mac wrote: I have several textboxes and checkboxes. I now insert them into an array but there is something called control array? How do you use it? My help function does not work! Freddie are you using Excel or is this homework? |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Control array
"Freddie Mac" wrote: I have several textboxes and checkboxes. I now insert them into an array but there is something called control array? How do you use it? My help function does not work! This will work. testNumber = Me.Controls("txtStart" & CStr(1)) Me.Controls("txtStart" & CStr(2)) = testNumber So it you have textboxes named txtStart1, txtStart2, txtStart3 etc. You obviously would use variable instead of the 1 and 2 I used. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with Control Array Sum Formula | Excel Discussion (Misc queries) | |||
Control array problem | Excel Programming | |||
Control Array Help... | Excel Programming | |||
Creating a Control Array | Excel Programming | |||
Dump 2D array into Control | Excel Programming |