Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
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
=HYPERLINK("#"&CELL("address", ADDRESS(MATCH(VALUE(B3),Range ... ? sarah Excel Worksheet Functions 0 February 17th 09 02:06 PM
How to create a range address with ADDRESS function? Steve McLeod Excel Worksheet Functions 1 December 18th 08 02:02 PM
Address Range [email protected] Excel Worksheet Functions 5 August 23rd 07 06:07 PM
Deleting Range name's listed in the range address box. Satnam Patel Excel Discussion (Misc queries) 4 May 5th 05 01:42 PM
Row from address of range KyWilde Excel Programming 3 April 22nd 05 08:07 AM


All times are GMT +1. The time now is 11:16 PM.

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"