Annoying Pop up box in function

  • Thread starter Thread starter silvest
  • Start date Start date
S

silvest

well, a popup box in a function is like when running a function, say
"IF" function..

a input box will pop up asking for "Logical test", "Value if true", an
"Value if false"

mine only has one input box which is labelled (XX)... and the proble
is as mentioned abov
 
Okay, I get it now. You're using Insert > Function from the menu.

My advice is to remove the message boxes from your function. If you want to
show a descriptive error message, then make your function return that error
message

Function ConvertDate(lInput as Long) as Variant
Select Case lInput
Case Is < 1000
ConvertDate = "Error: Input too small"
'Other cases
End Select
End Function

If you really want message boxes, the Len test worked for me

Function ConvertDate(xx)

If Len(xx) > 4 Then
Select Case xx
Case Is < 1000
MsgBox "blah"
End Select
End If

End Function

did not show a message box as I was typing.
 
Back
Top