How can I detect whether the user has pressed Cancel or OK in an inputbox?
I know that when they press cancel, the function returns an empty string.
But, what about if the user leaves the textbox blank and presses OK? It still returns an empty string even though Cancel wasn't pressed.
strSearch = InputBox("Please enter the name for this " & strType & ".", "Enter Name.")
If strSearch = 0 Then Exit Function
i need it to be able to determine an empty inputbox, a cancel or an input..
with the if strSearch = 0, i get a type mismatch...
forget my comment... i didn't realize that
StrPtr was an actual recognized command like Cint, or something like that. i had tried a StrCheck(strSearch) first, then just the strSearch, one i put in StrPtr, worked awesome..
I feel soo stupiddd lol
Last edited by myrrdan; Mar 18th, 2004 at 03:41 PM.
Oooops.....theres another semi-colon in the wrong spot....