Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub cmdEnter_Click()
- If cmdEnter.Caption = "Enter Fun Zone" Then
- Username = txtUsername.Text
- Password = txtPassword.Text
- Do While (Password = "") Or (Password <> "Ghost")
- MsgBox "Incorrect Password", 0 + 48, "Password"
- txtPassword.Text = ""
- Password = InputBox("Re-Enter your password: ", "Password")
- Loop
- If (Password = "Ghost") Then
- lblTop.Caption = "Welcome to The Fun Zone, " + Username + "!"
- fraFunZone.Visible = True
- txtFrom.Visible = True
- cmdEnter.Caption = "Enter Fun Zone"
- End If
- If cmdEnter.Caption = "Exit Fun Zone" Then
- End
- End If
- End If
- End Sub
- Private Sub cmdGo_Click()
- If ((txtFrom.Text <> "") And (txtTo.Text <> "")) Then
- Dim startNum As Integer
- Dim endNum As Integer
- num = 1
- startNum = txtFrom.Text
- endNum = txtTo.Text
- lstOutput.AddItem startNum
- txtFrom.Text = ""
- txtTo.Text = ""
- ElseIf ((txtFrom.Text = "") Or (txtTo.Text = "")) Then
- MsgBox "Please enter values into the text boxes before hitting 'go'.", 0 = 48, "Error"
- End If
- If (endNum > startNum + num) Then
- lstOutput.Clear
- Do
- lstOutput.AddItem startNum
- startNum = startNum + num
- Loop Until (startNum = endNum)
- End If
- If (startNum > endNum) Then
- lstOutput.Clear
- Do
- startNum = startNum - num
- lstOutput.AddItem startNum
- Loop Until (startNum = endNum + 1)
- End If
- End Sub
- Private Sub Form_Load()
- fraFunZone.Visible = False
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement