Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Asking to Select a Range

Hi people,

I´m trying to do a macro that asks the user to select a range. , and
then get the address selected. How can I display the select-range box
inside the program?
Thanks for any help

Irailson
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Asking to Select a Range

Small example from Help

Sub test()
Worksheets("Sheet1").Activate
Set mycell = Application.InputBox( _
prompt:="Select a cell", Type:=8)
mycell.Select
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Irailson" wrote in message om...
Hi people,

I´m trying to do a macro that asks the user to select a range. , and
then get the address selected. How can I display the select-range box
inside the program?
Thanks for any help

Irailson



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Asking to Select a Range

You can put up an application.inputbox and retrieve the range:


dim myRng as range
set myrng = nothing
on error resume next
set myrng = application.inputbox(prompt:="Point and click", type:=8)
on error goto 0
if myrng is nothing then
'use cancelled.
exit sub '???
end if

msgbox myrng.address(external:=true)




Irailson wrote:

Hi people,

I´m trying to do a macro that asks the user to select a range. , and
then get the address selected. How can I display the select-range box
inside the program?
Thanks for any help

Irailson


--

Dave Peterson

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
How can change range to select active rows instead of :=Range("S10 ldiaz Excel Discussion (Misc queries) 7 August 29th 08 03:52 PM
When entering data into a range of cells, select the entire range. Q Excel Discussion (Misc queries) 0 September 26th 07 04:36 AM
Select Using Range vijaya Excel Discussion (Misc queries) 1 November 2nd 05 07:33 PM
I cannot select a range Kassie Excel Discussion (Misc queries) 3 February 21st 05 06:09 AM
Select a range Kevin Excel Discussion (Misc queries) 3 February 18th 05 11:04 PM


All times are GMT +1. The time now is 04:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"