ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   activating the cancel button on Input boxes (https://www.excelbanter.com/excel-programming/311527-activating-cancel-button-input-boxes.html)

Shane

activating the cancel button on Input boxes
 
Hi all, I have a type 8 (range) input box. How can I make the procedure
exit when the user clicks on the cancel icon on the input box without
getting an error.

Many thanks
S



Tom Ogilvy

activating the cancel button on Input boxes
 
dim rng as Range
On Error Resume Next
set rng = Application.Inputbox("Prompt", Type:=8)
On Error goto 0
if rng is nothing then
msgbox "No range selected"
exit sub
End if
--
Regards,
Tom Ogilvy


"Shane" wrote in message
...
Hi all, I have a type 8 (range) input box. How can I make the procedure
exit when the user clicks on the cancel icon on the input box without
getting an error.

Many thanks
S





Shane

activating the cancel button on Input boxes
 
THANK YOU!!!


"Tom Ogilvy" wrote in message
...
dim rng as Range
On Error Resume Next
set rng = Application.Inputbox("Prompt", Type:=8)
On Error goto 0
if rng is nothing then
msgbox "No range selected"
exit sub
End if
--
Regards,
Tom Ogilvy


"Shane" wrote in message
...
Hi all, I have a type 8 (range) input box. How can I make the procedure
exit when the user clicks on the cancel icon on the input box without
getting an error.

Many thanks
S








All times are GMT +1. The time now is 05:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com