![]() |
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 |
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 |
All times are GMT +1. The time now is 12:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com