G
Guest
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
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