Here's one thats got me bugged,
If the error check finds nothing in textbox12 of the userform1, it reports the error correctly.
Entering the info into textbox12 AFTER the check triggers, the code stops and the workbook hangs, the only way to clear is to close the UserForm and begin again.
If I remove the first Exit Sub the error check does not trap.
Any Suggestions?
If the error check finds nothing in textbox12 of the userform1, it reports the error correctly.
Entering the info into textbox12 AFTER the check triggers, the code stops and the workbook hangs, the only way to clear is to close the UserForm and begin again.
If I remove the first Exit Sub the error check does not trap.
Any Suggestions?
Code:
Private Sub CommandButton1_Click()
If Not IsNumeric([TextBox12].Value) Or [TextBox12].Value < 1 Then _
MsgBox "Number of Lines not defined or less than zero.", , _
"Try Again":
'Range("TextBox12").Select
Exit Sub
ActiveWorkbook.Sheets("Remarks").Activate
Range("A1:A11").ClearContents
Range("A1") = TextBox1.Text
Range("A2") = TextBox2.Text
Range("A3") = TextBox3.Text
Range("A4") = TextBox4.Text
Range("A5") = TextBox5.Text
Range("A6") = TextBox6.Text
Range("A7") = TextBox7.Text
Range("A8") = TextBox8.Text
Range("A9") = TextBox9.Text
Range("A10") = TextBox10.Text
Range("A11") = TextBox11.Text
Unload UserForm1
Sheets("Main Menu").Select
End Sub