Re: [RESOLVED] checkboxes
Thanks..Hack
What about textboxes ? if any of the textboxes in the array are empty..
VB Code:
Dim i As Long
For i = 0 To 10
If text1(i).text="" Then
MsgBox text1(i) & (i) & " is empty"
End If
Next
does this work ?
Re: [RESOLVED] checkboxes
did u try it? ;)
(it should :) )
Re: [RESOLVED] checkboxes
No I havent tried it yet...But one thing I want to know..what Hack has given is useful when any of the checkboxes is empty..But what I am really after is ,after I answered(checked) all of the questions ,I want to get a message "well done you did a good job"
hope it is clear enough..
Re: [RESOLVED] checkboxes
VB Code:
Dim i As Long
Dim bChecked as Boolean
bChecked = True
For i = 0 To 10
If Check(i).Value <> vbChecked Then
MsgBox Check1(i) & (i) & " is not checked"
bChecked = False
End If
Next
If bChecked Then
MsgBox "All Checked"
End If
Re: [RESOLVED] checkboxes
Thanks everybody..it is done.
Re: [RESOLVED] checkboxes
use the click event of the check box to loop them
VB Code:
Private Sub Check1_Click(Index As Integer)
For x = 0 To Check1.UBound
If Check1(x).Value <> vbChecked Then Exit Sub
Next
MsgBox "all Checked"
End Sub
Re: [RESOLVED] checkboxes
Oh yes yours is better..
Thanks Static