Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / June 2007

Tip: Looking for answers? Try searching our database.

creating array of checkboxes on useform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
red6000 - 02 Jun 2007 16:05 GMT
Hi,

I use the following code to create an array of checkboxes on a userform:

   Dim xArray()
   Dim xCount As Integer
   Dim xControl As Control

   For Each xControl In EditFrm.Controls
       If TypeOf xControl Is MSForms.CheckBox Then
           ReDim Preserve xArray(xCount)
           Set xArray(xCount) = xControl
           xCount = xCount + 1
       End If
   Next xControl

How would I amend the code to create an array, but only for checkboxes
within a frame?

Thanks.
Jean-Guy Marcil - 02 Jun 2007 17:50 GMT
red6000 was telling us:
red6000 nous racontait que :

> Hi,
>
[quoted text clipped - 14 lines]
> How would I amend the code to create an array, but only for checkboxes
> within a frame?

Change
   If TypeOf xControl Is MSForms.CheckBox Then
for
   For Each xControl In EditFrm.Frame1.Controls

using the approriate object instead of Frame1, Oeuf Corse.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.