View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
salgud salgud is offline
external usenet poster
 
Posts: 219
Default Type mismatch error

The following code tests if the user has input both pieces of data before
proceding with the program. But I'm getting a Type Mismatch error on the IF
test.

Sub UserInputCheck()
frmFacil.Hide
sFacilNameUI = frmFacil.tbFacilName.Text
On Error Resume Next
lFacilRowsUI = frmFacil.tbFacilRows.Value
On Error GoTo 0
If sFacilNameUI = "" Or lFacilRowsUI = "" Then <------TYPE MISMATCH ERROR
MsgBox "Please enter a both a Facility Name and" & Chr(10) & _
"the number of clients served!", vbOKOnly
Call GetFacilName
End If

End Sub

How do I test for no entry on the lFacilRowsUI variable?