By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,780 Members | 1,118 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,780 IT Pros & Developers. It's quick & easy.

checkbox indexing

P: 89
I am working with VBA. i puted a checkbox control on the form, i looked at properties of checkbox but there is no INDEX properties. How to i can make index properties of checkbox in vba? Thx advance.
Dec 27 '07 #1
Share this Question
Share on Google+
1 Reply


Ali Rizwan
100+
P: 927
I am working with VBA. i putted a check box control on the form, i looked at properties of check box but there is no INDEX properties. How to i can make index properties of check box in vba? Thx advance.
Expand|Select|Wrap|Line Numbers
  1. Private WithEvents aa As CheckBox
  2.  
  3. Private Sub Form_Load()
  4.  
  5.  Set aa = Me.Controls.Add("VB.CheckBox", "cmdOk")
  6.  aa.Visible = True
  7.  aa.Caption = "ALI"
  8.  
  9. End Sub
  10.  
  11. Private Sub aa_Click()
  12.  MsgBox "Hello world"
  13. End Sub
  14.  
This is code for creating checkboxes at runtime.
Now only problem is that i m fail to create an array of these checkboxes.
If there any body can modify this code to an array then plz.

Regards

>> ALI <<
Dec 27 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.