i am attempting to use an inputbox but I cannot get the cancel function to work, how do i code it to actuallt make the input box go away if cancel is selected
Well, inputbox returns an empty string on Cancel, so that is your problem (I imagien you are keying off of "" to determine whether to show it again or not?)
The way you have things set up now, it is unlikely that you can do anything. Here is what I recommend, you need to give a default value basically. I gave a default value of " " (space) because this will be almost unnoticeable. Consider this example:
Code:
MyStart:
Select Case InputBox("Hello", "What Do You Say?", " ")
Case "Hello", "Hi", "Howdy"
MsgBox "How are you?"
Case " "
GoTo MyStart
Case ""
MsgBox "Forget you then"
End Select
The empty string ("") is returned from cancel, causing a certain behavior. The space (" ") is returned from "OK" with no text entered, causing an entirely different behavior.
Make Sense?
Hope it helps,
Alex
Ignorance of certain subjects is a great part of wisdom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.