LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 296
Default Control Index Numbers

I have a frame containing a dozen or so check boxes.

They've been added at various times and I've probably deleted some and
added others.

In some code I count the number of controls, and in a loop with say
'x' as a loop counter, I test the tag property of the control(x). I've
been having some problem with this and I now realise that what I
believed to be say the 3rd checkbox, ( because I thought it was the
third one I'd added), is actually recognised by VBA as say the 5th
checkbox, (identified by the x counter). i.e. Controls(x)

It seems clear that in all my additions and deletions, the system
number of the control is different to what I think it is.

My question is, is there any way of re-setting the system numbers of
these controls so that they line up with the order in which they
appear in the frame?

An associated question. Is there any way of observing directly what
the control number of a particular control is? I can obviously work it
out indirectly by writing a bit of code which tells me say the Tag or
Caption associated with a particular control, but it's not immediately
apparent if the system number is a property of the control which can
be viewed - and changed (in a similar way to the way in which the Tab
property number can be changed).

Rgds and usual TIA





__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
 
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
How do I get a index% of two numbers when they are negative or pos mrbernh Excel Worksheet Functions 2 May 19th 23 11:46 AM
Multipage Control Pages - Changing Index Value in Code misseill Excel Programming 1 July 13th 05 04:55 PM
Multipage Control Pages - Changing Index Value in Code misseill Excel Programming 0 July 13th 05 04:32 PM
Return Index of Control Object Clicked! gr8guy Excel Programming 3 May 11th 04 05:24 AM
Accesing a combobox control via it index propertie in VBA, Is itPossible? Muxer Excel Programming 3 July 30th 03 08:20 PM


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