the master
09-05-2003, 05:21 PM
hi, how do you tell if the cancel button has been pressed on an input box????
inputbox problemthe master 09-05-2003, 05:21 PM hi, how do you tell if the cancel button has been pressed on an input box???? Thinker 09-05-2003, 05:38 PM Like this... Dim Ans As String Ans = vbNullString Ans = InputBox("Please Enter whatever is needed", "DefaultAnswer") If StrPtr(Ans) = 0 Then 'Cancel was clicked Else 'Process Ans End If the master 09-05-2003, 05:47 PM wow, thanx, that must be the first time ive underestimated how complicated it would be to do something :D :D :D loGin 09-05-2003, 05:55 PM hey thinker.. thats a first seeing "StrPtr" while Str() if converting to strings, whats "StrPtr"? Thinker 09-05-2003, 06:02 PM Returns a pointer to the start of the string. More information here... http://www.visualbasicforum.com/showthread.php?threadid=26717 |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum