Halu! :-) Create a project in vb. Add 1 button on the form, also add a textbox.
The textbox just show you the number of clicked you've done. If the number of clicked is equal to 10, a msgbox will be displayed, and the counter variable A is set back to its initial value which is zero(0).
Dim a As Integer
Private Sub Command1_Click( )
a = a + 1
Text1.Text = a
If a = 10 Then
MsgBox "You click the button " & a & " times"
a = 0
Text1.Text = a
End If
End Sub
Thanks guys. I am new to this site, but I read some messages in this forum and it helped me complete my assignment. I knew the concepts of counting clicks, I just didn't know how to do it. Thanks! This forum helped a lot!
Comment