Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Help with Control Array Sum Formula Jim May Excel Discussion (Misc queries) 12 October 26th 06 11:03 AM
Control array problem inquirer Excel Programming 3 August 31st 05 07:10 AM
Control Array Help... excel_slave - ExcelForums.com Excel Programming 3 August 10th 05 01:19 PM
Creating a Control Array imrylin Excel Programming 4 March 3rd 05 04:35 AM
Dump 2D array into Control ExcelMonkey[_190_] Excel Programming 3 February 23rd 05 06:12 PM


All times are GMT +1. The time now is 07:03 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"