pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

Advertising: Credit Counseling - Loans - mobile phones - Loans
paste-bin - collaborative debugging tool View Help

Posted by Anonymous on Thu 1st Nov 15:04 (modification of post by view diff)
download | new post

  1. Option Explicit
  2.  
  3.  
  4. Private Sub Command1_Click()
  5.    
  6.  If Pic2.Visible = True Then
  7.         Dim msgOutcome As VbMsgBoxResult
  8.         msgOutcome = MsgBox("Bulbasaur Is Already Out!" & vbCrLf & "Would you like to choose another Pokemon?", vbExclamation Or vbYesNo, "Error")
  9.         Select Case msgOutcome
  10.             Case vbYes
  11.                 Pic2.Visible = False
  12.                 Command7.Visible = False
  13.                 Command8.Visible = False
  14.                 Command9.Visible = False
  15.                 Command10.Visible = False
  16.                 Text2.Visible = False
  17.                 Label5.Visible = False
  18.                 Text1.Text = Text1.Text & "Come back Bulbasaur!" & vbCrLf
  19.                 Text1.Text = Text1.Text & "Bulbasaur Came Back" & vbCrLf
  20.                
  21.                 'Yes has been chosen do stuff here
  22.                
  23.             Case vbNo
  24.                 Pic2.Visible = True
  25.                 'No has been chosen do stuff here
  26.         End Select
  27.     Else
  28.         Text1.Text = Text1.Text & "GOOO Bulbasaur!" & vbCrLf
  29.         Pic2.Visible = True
  30.         Command7.Visible = True
  31.         Command8.Visible = True
  32.         Command9.Visible = True
  33.         Command10.Visible = True
  34.         Text2.Visible = True
  35.         Label5.Visible = True
  36.     End If
  37. End Sub
  38.  
  39. Private Sub Command2_Click()
  40.  
  41. If Pic1.Visible = True Then
  42.         Dim msgOutcome As VbMsgBoxResult
  43.         msgOutcome = MsgBox("Squirtle Is Already Out!" & vbCrLf & "Would you like to choose another Pokemon?", vbExclamation Or vbYesNo, "Error")
  44.         Select Case msgOutcome
  45.             Case vbYes
  46.                 Pic1.Visible = False
  47.                 Command3.Visible = False
  48.                 Command4.Visible = False
  49.                 Command5.Visible = False
  50.                 Command6.Visible = False
  51.                 Label4.Visible = False
  52.                 Text3.Visible = False
  53.                 Text1.Text = Text1.Text & "Come back Squirtle!" & vbCrLf
  54.                 Text1.Text = Text1.Text & "Squirtle Came Back" & vbCrLf
  55.                
  56.                 'Yes has been chosen do stuff here
  57.                
  58.             Case vbNo
  59.                 Pic1.Visible = True
  60.                 'No has been chosen do stuff here
  61.         End Select
  62.     Else
  63.         Text1.Text = Text1.Text & "GOOO Squirtle!" & vbCrLf
  64.         Pic1.Visible = True
  65.         Command3.Visible = True
  66.         Command4.Visible = True
  67.         Command5.Visible = True
  68.         Command6.Visible = True
  69.         Label4.Visible = True
  70.         Text3.Visible = True
  71.     End If
  72.    
  73.     End Sub
  74.  
  75. Private Sub Command4_Click()
  76.     MsgBox "You chose Bubble!", vbOKOnly, "Attack Type"
  77.     Text1.Text = Text1.Text & "Squirtle Did Bubble!" & vbCrLf
  78. End Sub
  79.  
  80. Private Sub Form_Load()
  81.  
  82.     Pic1.Visible = False
  83.     Pic2.Visible = False
  84.     Command5.Visible = False
  85.     Command6.Visible = False
  86.     Command7.Visible = False
  87.     Command8.Visible = False
  88.     Command9.Visible = False
  89.     Command10.Visible = False
  90.     Command4.Visible = False
  91.     Command3.Visible = False
  92.     Label4.Visible = False
  93.     Label5.Visible = False
  94.     Text2.Visible = False
  95.     Text3.Visible = False
  96. End Sub
  97.  
  98. Private Sub Text1_Change()
  99.     On Error Resume Next
  100.     Text1.SelLength = 0
  101.     If Len(Text1.Text) > 0 Then
  102.         If Right$(Text1.Text, 1) = vbCrLf Then
  103.             Text1.SelStart = Len(Text1.Text) - 1
  104.             Exit Sub
  105.         End If
  106.         Text1.SelStart = Len(Text1.Text)
  107.     End If
  108. End Sub

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.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me
: