• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Crash Code

delta

Member
below this code work till TextBox6.value = 9 and than crash i need it work TextBox6.value = 10 and then show message box
i upload sample file



Private Sub CommandButton1_Click()

If Sheets("ENTRY").Range("I2").Value = "NO" Then
Call Add_Data

TextBox6.Value = Sheets("BAZE").Range("B2").Value

TextBox5.Value = Sheets("ENTRY").Range("H2").Value

TextBox1.Value = Application.WorksheetFunction.VLookup(TextBox5, Sheets("ENTRY").Range("B2:F11"), 2, 0)
TextBox2.Value = Application.WorksheetFunction.VLookup(TextBox5, Sheets("ENTRY").Range("B2:F11"), 3, 0)
TextBox3.Value = Application.WorksheetFunction.VLookup(TextBox5, Sheets("ENTRY").Range("B2:F11"), 4, 0)
TextBox4.Value = Application.WorksheetFunction.VLookup(TextBox5, Sheets("ENTRY").Range("B2:F11"), 5, 0)


Do
Call randomCollection

TextBox5.Value = Sheets("ENTRY").Range("H2").Value

Loop Until Sheets("ENTRY").Range("I2").Value = "NO"

If TextBox6.Value = 10 Then

MsgBox "GAME IS OVER"
End If
End If


End Sub
 

Attachments

  • Form.xlsm
    24.7 KB · Views: 2
Back
Top