Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Inputbox Method - cancel Event

How do I trap a cancel event on the following code?

Set rng = Application.InputBox(Msg1, Title1, Type:=8)

Note the Type=8 (range)

I am trying to trap a CANCEL event as well as an "OK" when the user does not
select a range.

Thanks for your help


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Inputbox Method - cancel Event

din rng as variant and get rid of the SET word.

You can trap 'CANCEL' easily enough - rng will have teh value'False'

AFAIK though, you can't error outof this type of input as it requires a
range as input.
Alternative ly use your own userform and code up an appropriate input box.



"Rafi" wrote:

How do I trap a cancel event on the following code?

Set rng = Application.InputBox(Msg1, Title1, Type:=8)

Note the Type=8 (range)

I am trying to trap a CANCEL event as well as an "OK" when the user does not
select a range.

Thanks for your help


Reply
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
Detecting Cancel in an InputBox Method Connie Excel Discussion (Misc queries) 2 October 19th 06 01:32 PM
Cancel button in Inputbox method MiRa Excel Programming 2 November 14th 03 01:04 PM
Inputbox method using type:=8 - How to Cancel? Joe 90 Excel Programming 0 July 10th 03 12:24 AM
Inputbox method using type:=8 - How to Cancel? Harlan Grove[_5_] Excel Programming 1 July 9th 03 12:06 AM
Inputbox method using type:=8 - How to Cancel? Jim Cone Excel Programming 0 July 8th 03 06:15 PM


All times are GMT +1. The time now is 09:32 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"