LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Control for Range

You have to write your code to properly handle the cancel

Dim temp_range as Range
On Error Resume Next
Set temp_range = Application.InputBox(prompt:= _
"Select Range for Operation",Type:=8)
On Error goto 0
if temp_range is nothing then
' user hit cancel
else
temp_range.Select
End if

The last several lines are just illustrative of taking action - you can
program whatever is appropriate in your situation.

--
Regards,
Tom Ogilvy


"Syed Zeeshan Haider" wrote in
message ...
"Keith Willshaw" wrote in message ...

If you use the type argument with input box you can select
a range using the mouse

Dim temp_range as Range
Set temp_range = Application.InputBox(prompt:="Select Range for

Operation",
Type:=8)


Thanks! It is a good replacment of RefEdit for certain occasioans.

There is a problem. When I click Cancel button it raises error 424, that

is
"Object required".

How can I get rid of this error?

Thank you




 
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
Coping Format Control input range to other picklists - HELP!! Tibby Excel Discussion (Misc queries) 0 October 28th 08 04:04 PM
Sum Every 4th column in a range tied to a control cell [email protected] Excel Worksheet Functions 4 August 19th 08 03:41 PM
No range option in format control for combo box Sai Krishna[_2_] Excel Worksheet Functions 1 January 2nd 08 11:37 AM
Is it possible to create a dynamic range in CONTROL TOOLBOX (form) [email protected] Excel Discussion (Misc queries) 7 July 27th 07 07:28 AM
Is it possible to change the Input Range of a Form Control programmatically? dchow Excel Programming 3 November 21st 03 02:10 PM


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