Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do you have range address
I need to have the user select a range of cells, click a button to run a
macro, select another range and click another button to run another macro. I need to save the address of the original range that was selected for reference in the second macro. What would be the command syntax to save the address of the initial range so I can reference it again. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do you have range address
Dim firstrange as range
.. .. .. set firstrange = Selection Just remember to dim the variable in the module outside of both macros. That way it will be static and not loose its value once the first macro exits -- Gary''s Student "Mike" wrote: I need to have the user select a range of cells, click a button to run a macro, select another range and click another button to run another macro. I need to save the address of the original range that was selected for reference in the second macro. What would be the command syntax to save the address of the initial range so I can reference it again. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do you have range address
That does what I needed.
Thanks!!! "Gary''s Student" wrote in message ... Dim firstrange as range . . . set firstrange = Selection Just remember to dim the variable in the module outside of both macros. That way it will be static and not loose its value once the first macro exits -- Gary''s Student "Mike" wrote: I need to have the user select a range of cells, click a button to run a macro, select another range and click another button to run another macro. I need to save the address of the original range that was selected for reference in the second macro. What would be the command syntax to save the address of the initial range so I can reference it again. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
=HYPERLINK("#"&CELL("address", ADDRESS(MATCH(VALUE(B3),Range ... ? | Excel Worksheet Functions | |||
How to create a range address with ADDRESS function? | Excel Worksheet Functions | |||
Address Range | Excel Worksheet Functions | |||
Deleting Range name's listed in the range address box. | Excel Discussion (Misc queries) | |||
Row from address of range | Excel Programming |