View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default UserForm value check

I have 2 text boxes and 2 combo boxes on a user form. On
Exit of each box I want to make sure the the box has a
value in it, if not stop and return to the box. I continue
to get a function not defined error. Here is my code for
one of the combo boxes (ComboBox1=January, Combobox2=2004,
Textbox 1 and 2 are keyed in text):

Private Sub cbo_Exit(ByVal Cancel as MSForms.ReturnBoolean)
Dim SStr=frmSetupForm.cboMth.Text
If IsBlank(sStr) Then
MsgBox "Please select month."
Cancel True
End If
End Sub

Thanks