Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can change range to select active rows instead of :=Range("S10 | Excel Discussion (Misc queries) | |||
When entering data into a range of cells, select the entire range. | Excel Discussion (Misc queries) | |||
Select Using Range | Excel Discussion (Misc queries) | |||
I cannot select a range | Excel Discussion (Misc queries) | |||
Select a range | Excel Discussion (Misc queries) |