How do you ( in the Formload ) Tell a checkbox to be checked?? And how do you ask if it is checked or not??
Printable View
How do you ( in the Formload ) Tell a checkbox to be checked?? And how do you ask if it is checked or not??
In Form's Load Event write this code:
I'm not sure what you are asking about in second part. Do you mean how to check if Checkbox is checked? If that's the case then use this:Code:Private Sub Form_Load()
Check1.Value = Checked
End Sub
Or do you want to ask user if the check box has to be checked or not. In this case use this:Code:If Check1.Value = Checked Then
'do something
ElseIf Check1.Value = Unchecked Then
'do something else
End If
HTHCode:If MsgBox("Check Checkbox?", vbYesNo, "Checkbox") = vbYes Then
Check1.Value = Checked
Else
Check1.Value = Unchecked
End If
Edited by QWERTY on 02-28-2000 at 06:40 PM