Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,561 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,900 people online right now. Registration is fast and FREE... Join Now!




adding a counter

 
Reply to this topicStart new topic

adding a counter

altair
8 Apr, 2008 - 09:53 PM
Post #1

New D.I.C Head
*

Joined: 8 Apr, 2008
Posts: 1

here's my code... it's supposed to have a counter, the user is only given 3 times.

If password = "gateways" Then
Form1.Hide
Form2.Show
ElseIf password <> "gateways" Then
Do
Counter = 0
Counter = Counter + 1
boxvalue = MsgBox("Invalid! You have " & Counter & " try/ies left, do you want to continue!", 4 + 16)
Loop while Counter <3
End If

If boxvalue = 6 Then
password.SetFocus
ElseIf boxvalue = 7 Then
End
End If
End Sub

please help me
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: Adding A Counter
8 Apr, 2008 - 09:56 PM
Post #2

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 6,465



Thanked: 66 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
CODE

Do
Counter = 0
If password = "gateways" Then
Form1.Hide
Form2.Show
ElseIf password <> "gateways" Then
Counter = Counter + 1
boxvalue = MsgBox("Invalid! You have " & Counter & " try/ies left, do you want to continue!", 4 + 16)
End If
Loop while Counter <3

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 11:38PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month