LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Input Box - Hit cancel

It there not really a direct way to tell if the Cancel button was clicked of
an InputBox. I was told in an earlier posting to do something like this:

EnterState = InputBox("Enter State: ")
If EnterState < "" Then
ActiveCell.Value = EnterState
Else
ActiveCell.Value = Null
Endif

'----But----
What I want is if the cancel is pressed don't do anything. What is
happening is if for example the current cell value is "Florida" ; and the
InputBox opens and the person puts "North Carolina" in the InputBox field and
then changes their mind and clicks Cancel, then the cell value is
erased....when it should still say "Florida"

How do you catch the Cancel key press and tell it don't do anything.

Thank you for your help.

Steven
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Input Box Cancel Jase Excel Discussion (Misc queries) 2 September 15th 08 11:42 PM
Input Box - CANCEL Danny Excel Worksheet Functions 6 December 1st 06 02:15 AM
Input box to cancel sub when Cancel is clicked. PCLIVE Excel Programming 5 September 5th 06 03:19 PM
Input box cancel Little Penny Excel Programming 1 August 25th 06 11:50 PM
cancel input ME @ Home Excel Discussion (Misc queries) 1 February 22nd 06 09:49 AM


All times are GMT +1. The time now is 07:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"