Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to query the controls in form using vb
I have a group of checkboxes ( about 20 ) which i created
during runtime. I want to check the status of each checkbox in the form to see if the value is true or false. how do i do it ? Thanks Andy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to query the controls in form using vb
Andy,
try this. It's set up to run from a form control, with all check boxes names as "chk...." Option Compare Text Private Sub CommandButton1_Click() Dim ctlTest As msforms.Control For Each ctlTest In Me.Controls If Left(ctlTest.Name, 3) = "chk" Then Debug.Print ctlTest.Name, ctlTest.Value Next ctlTest End Sub HTH, Robin Hammond www.enhanceddatasystems.com "Andy Chan" wrote in message ... I have a group of checkboxes ( about 20 ) which i created during runtime. I want to check the status of each checkbox in the form to see if the value is true or false. how do i do it ? Thanks Andy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Form controls in Excel 07 | Excel Discussion (Misc queries) | |||
Form Fields or Controls? | Excel Discussion (Misc queries) | |||
ActiveX Controls vs Form Controls | Excel Discussion (Misc queries) | |||
User Form Controls | Excel Programming | |||
User Form Controls | Excel Programming |