Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default 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
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
Form controls in Excel 07 New to Excel 07 Excel Discussion (Misc queries) 1 July 30th 07 04:43 PM
Form Fields or Controls? David Cahill Excel Discussion (Misc queries) 1 May 14th 06 03:07 AM
ActiveX Controls vs Form Controls Alex Excel Discussion (Misc queries) 1 January 11th 06 08:46 AM
User Form Controls Keith Willshaw Excel Programming 0 August 29th 03 01:20 PM
User Form Controls Tom Ogilvy Excel Programming 0 August 29th 03 12:42 PM


All times are GMT +1. The time now is 12:26 PM.

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"