Dave Hawley Help Again!!
Posted by Christine on March 28, 2001 1:11 AM
Hi David
Further to my message on Mr Excel, can I ask for your assistance again.
Is there any way that I can use your code to have the user cancel the form if they want too. As your code stands, when the user wants to cancel the form, it is still asking for a date value first.
******************************************************************
Hi One and All.
Hi Christine
I can't help but help a fellow Oz.
Try this:
Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox1.Value = "" Then
Cancel = True
MsgBox "You must enter a value!"
Exit Sub
Else: Select Case TextBox1
Case IsNumeric(TextBox1)
MsgBox "Number"
Case Else
MsgBox "Text"
End Select
Cancel = False
End If
End Sub