Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dan,
There is no IsBlank function in VBA. Try If sStr = "" Then -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Dan" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Spell Check Within a UserForm? | Excel Programming | |||
Spell Check Within a UserForm? | Excel Programming | |||
Check image availability on userform | Excel Programming | |||
Can't check checkboxes in userform ... sometimes | Excel Programming | |||
Check if Userform exsists before deleting via VB | Excel Programming |