View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default InputBox buttons

sorry for the double post. i got caught up in a email varification loop and
didn't know my first post went through. Has anyone noticed that communities
newsgroups has been acting a little weird lately?

regards
FSt1

"FSt1" wrote:

hi
try this
Dim r As String
r = InputBox("enter something")
If Not r = "" Then 'user clicked cancel
'do something
else
'do something else
end if

Regards
FSt1
"Karen53" wrote:

Hi,

How do I capture the OK or Cancel button on an input box?

I've tried this but I get a type mismatch error...

Dim NewHeader as String

If NewHeader = vbOK Then 'if input box was not cancelled

--
Thanks for your help.
Karen53