|
-
Oct 8th, 2000, 12:10 PM
#1
Thread Starter
Member
how can i write a code for a cancel button that this set the value of all checkboxes on a form to "vbunchecked"?????
f.Ex. checkbox 1 to 10 are "checked" , cancel button is down , value of checkbox 1 to 10 should be "vbunchecked"!
-
Oct 8th, 2000, 12:22 PM
#2
Try this:
Code:
Private Sub Command1_Click()
For Each MyControl In Me.Controls
If TypeOf MyControl Is CheckBox Then MyControl.Value = vbUnchecked
Next
End Sub
-
Oct 8th, 2000, 12:26 PM
#3
Frenzied Member
Put a timer on a form, interval 1000, put the checkboxes in an array:
Code:
Private Sub Timer1_timer()
Dim x As Integer
For x = Check1.Lbound To Check1.Ubound
If Check1(x).Value = False Then
Command1.Enabled = False
Exit Sub
End If
Next x
Command1.Enabled = True
End Sub
Oh sh*t, didn't read your post with much concentration 
Use Matthew's code...
I keep my code here for anyone who needs it sometime
[Edited by Jop on 10-08-2000 at 03:49 PM]
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|