- Option Explicit
- Private Sub Command1_Click()
- If Pic2.Visible = True Then
- Dim msgOutcome As VbMsgBoxResult
- msgOutcome = MsgBox("Bulbasaur Is Already Out!" & vbCrLf & "Would you like to choose another Pokemon?", vbExclamation Or vbYesNo, "Error")
- Select Case msgOutcome
- Case vbYes
- Pic2.Visible = False
- Command7.Visible = False
- Command8.Visible = False
- Command9.Visible = False
- Command10.Visible = False
- Text2.Visible = False
- Label5.Visible = False
- Text1.Text = Text1.Text & "Come back Bulbasaur!" & vbCrLf
- Text1.Text = Text1.Text & "Bulbasaur Came Back" & vbCrLf
- 'Yes has been chosen do stuff here
- Case vbNo
- Pic2.Visible = True
- 'No has been chosen do stuff here
- End Select
- Else
- Text1.Text = Text1.Text & "GOOO Bulbasaur!" & vbCrLf
- Pic2.Visible = True
- Command7.Visible = True
- Command8.Visible = True
- Command9.Visible = True
- Command10.Visible = True
- Text2.Visible = True
- Label5.Visible = True
- End If
- End Sub
- Private Sub Command2_Click()
- If Pic1.Visible = True Then
- Dim msgOutcome As VbMsgBoxResult
- msgOutcome = MsgBox("Squirtle Is Already Out!" & vbCrLf & "Would you like to choose another Pokemon?", vbExclamation Or vbYesNo, "Error")
- Select Case msgOutcome
- Case vbYes
- Pic1.Visible = False
- Command3.Visible = False
- Command4.Visible = False
- Command5.Visible = False
- Command6.Visible = False
- Label4.Visible = False
- Text3.Visible = False
- Text1.Text = Text1.Text & "Come back Squirtle!" & vbCrLf
- Text1.Text = Text1.Text & "Squirtle Came Back" & vbCrLf
- 'Yes has been chosen do stuff here
- Case vbNo
- Pic1.Visible = True
- 'No has been chosen do stuff here
- End Select
- Else
- Text1.Text = Text1.Text & "GOOO Squirtle!" & vbCrLf
- Pic1.Visible = True
- Command3.Visible = True
- Command4.Visible = True
- Command5.Visible = True
- Command6.Visible = True
- Label4.Visible = True
- Text3.Visible = True
- End If
- End Sub
- Private Sub Command4_Click()
- MsgBox "You chose Bubble!", vbOKOnly, "Attack Type"
- Text1.Text = Text1.Text & "Squirtle Did Bubble!" & vbCrLf
- End Sub
- Private Sub Form_Load()
- Pic1.Visible = False
- Pic2.Visible = False
- Command5.Visible = False
- Command6.Visible = False
- Command7.Visible = False
- Command8.Visible = False
- Command9.Visible = False
- Command10.Visible = False
- Command4.Visible = False
- Command3.Visible = False
- Label4.Visible = False
- Label5.Visible = False
- Text2.Visible = False
- Text3.Visible = False
- End Sub
- Private Sub Text1_Change()
- On Error Resume Next
- Text1.SelLength = 0
- If Len(Text1.Text) > 0 Then
- If Right$(Text1.Text, 1) = vbCrLf Then
- Text1.SelStart = Len(Text1.Text) - 1
- Exit Sub
- End If
- Text1.SelStart = Len(Text1.Text)
- End If
- End Sub
Posted by Anonymous on Thu 1st Nov 15:04 (modification of post by view diff)
download | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.