View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Michael Vaughan Michael Vaughan is offline
external usenet poster
 
Posts: 71
Default Invalid Qualifier???

Hello Everyone,

I have an UserForm that loads data into the form. Then, you can update the
data. The problem that I have is that some of the textboxes are numbers and
I am doing a math check to see if it exceeds a number. What I want it to do
is: If it exceeds the value, then it returns to the Userform in the correct
textbox by using the setfocus. But, it keeps erroring out, "Invalid
Qualifier"??? The line of text is below. How can I set the focus to that
textbox BAdult???

If Val(BAdult) + Val(BChild) 12 Then MsgBox "Max people in that
section is 12!", vbInformation, "Compartment Error": BAdult.SetFocus: Exit
Sub

BAdult.SetFocus errors out!!!!