|
-
Jul 27th, 2006, 01:52 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] checkboxes
Hi,
I used an array of checkboxes.as in the example below
VB Code:
for i=0 to 10
check1(i).value=1
next
and I want to get a message to know that all checkboxes are checked
There is no check.count so how do you do it ?
**My same question is true for textboxes..I want to get a message when all textboxes in the array are filled with a text..
thanks..
-
Jul 27th, 2006, 01:55 PM
#2
Re: checkboxes
VB Code:
Dim i As Long
For i = 0 To 10
If Check(i).Value <> vbChecked Then
MsgBox Check1(i) & (i) & " is not checked"
End If
Next
-
Jul 27th, 2006, 02:06 PM
#3
Thread Starter
Fanatic Member
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 ?
-
Jul 27th, 2006, 02:10 PM
#4
Re: [RESOLVED] checkboxes
did u try it? 
(it should )
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jul 27th, 2006, 02:17 PM
#5
Thread Starter
Fanatic Member
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..
-
Jul 27th, 2006, 02:22 PM
#6
Frenzied Member
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
-
Jul 27th, 2006, 02:29 PM
#7
Thread Starter
Fanatic Member
Re: [RESOLVED] checkboxes
Thanks everybody..it is done.
-
Jul 27th, 2006, 02:32 PM
#8
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
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jul 27th, 2006, 02:51 PM
#9
Thread Starter
Fanatic Member
Re: [RESOLVED] checkboxes
Oh yes yours is better..
Thanks Static
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
|