View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Corey Corey is offline
external usenet poster
 
Posts: 276
Default Input Box - CANCEL

Sub InputNumber()
res = InputBox("What is the number?")
If res = "" Then
Exit Sub
End If
End Sub


"Danny" wrote in message
...
Hi,

Please edit the macro below so when the user clicks on CANCEL or CLOSE the
box, Range A1 existing input won't change.

Sub InputNumber()
Range("A1").Value = InputBox("What is the number?")
End Sub

Thank you.