ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Annoying Pop up box in function (https://www.excelbanter.com/excel-programming/312870-annoying-pop-up-box-function.html)

silvest[_14_]

Annoying Pop up box in function
 

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

--
silves
-----------------------------------------------------------------------
silvest's Profile: http://www.excelforum.com/member.php...fo&userid=1466
View this thread: http://www.excelforum.com/showthread.php?threadid=26731


Dick Kusleika[_3_]

Annoying Pop up box in function
 
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.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"silvest" wrote in message
...

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", and
"Value if false"

mine only has one input box which is labelled (XX)... and the problem
is as mentioned above


--
silvest
------------------------------------------------------------------------
silvest's Profile:

http://www.excelforum.com/member.php...o&userid=14662
View this thread: http://www.excelforum.com/showthread...hreadid=267318





All times are GMT +1. The time now is 12:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com