Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Form_Load()
- Dim passwordGary As String
- Dim passwordLes As String
- Dim passwordMohammed As String
- Dim passwordNorah As String
- Dim passwordOscar As String
- Dim passwordPascale As String
- Dim pass As String
- Dim password As String
- Dim username As String
- Dim datatype As String
- Dim thedate As Date
- Dim days As Date
- Dim micnum As Double
- Dim error As String
- Dim correct As Double
- TestString_Variable = “Hello”
- passwordGary = "GaryPass"
- passwordLes = "LesPass"
- passwordMohammed = "MohammedPass"
- passwordNorah = "NorahPass"
- passwordOscar = "OscarPass"
- passwordPascale = "PascalePass"
- username = InputBox("Hello, please enter your name")
- Do While username <> "Gary" And username <> "Les" And username <> "Mohammed" _
- And username <> "Norah" And username <> "Oscar" And username <> "Pascale"
- MsgBox "Sorry who are you?"
- username = InputBox("Please enter your name")
- Loop
- password = InputBox("Please enter password")
- If username = Gary
- pass = passwordGary
- End If
- If username = Les
- pass = passwordLes
- End If
- If username = Mohammed
- pass = passwordMohammed
- End If
- If username = Norah
- pass = passwordNorah
- End If
- If username = Oscar
- pass = passwordOscar
- End If
- If username = Pascale
- pass = passwordPascale
- End If
- Do While password <> "pass"
- MsgBox "Password is wrong!"
- password = InputBox("Please enter your password")
- Loop
- datatype = InputBox("Did you collect the data yourself?")
- If datatype <> "Yes" And datatype <> "yes" Then
- datatype = InputBox("Who collected the data then?")
- Do While datatype <> "Gary" And datatype <> "Les" And datatype <> "Mohammed" _
- And datatype <> "Norah" And datatype <> "Oscar" And datatype <> "Pascale"
- MsgBox "Wrong name"
- datatype = InputBox("Please re-enter a name?")
- Loop
- End If
- thedate = InputBox("Please enter the date when data was collected")
- days = Date - thedate
- If days > 7 Or days < 0 Then
- MsgBox "Please enter another date which is not out of date"
- Do While days > 7 Or days < 0
- MsgBox "Too OLD! please re-enter"
- thedate = InputBox("Please enter the date")
- days = Date - thedate
- Loop
- End If
- micnum = InputBox("Please enter a micro number between 150.00 and 5.00")
- Do While micnum <> -1
- If Not IsNumeric(Numbers) Or micnum > 150 Or micnum < 5 Then
- error = MsgBox("ERROR. Please emter a number between 150.00 and 5.00")
- Else
- correct = correct + micnum
- End If
- micnum = InputBox("Please enter a micro number between 150.00 and 5.00")
- Loop
- MsgBox correct
- End
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement