Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Using a macro in multiple sheets

Here's the latest thing making my head hurt:

I have a handful of macros which interact with a user to ultimately create a
block diagrm of sorts. The blocks have numbers associated with them, and all
around the blocks are calculations and results based on the exact connections
of the various types of blocks. This isn't a trivial macro (for me anyway).

Now, I would like to able to run my macros on another sheet in the same
workbook, without affecting the first sheet. But since I am using Names, I
seem to be stuck.
That is, I can't use the same Name on two different sheets. And I need to.
Is there a way to restrict reference to a Name to the sheet where it is
defined ONLY? In this project, one of the objectives is to end up with the
Names in the various equations (for ease of understanding the results). So I
don't want to resort to using "Sheet1:C24" type references.

I suppose I could "tag" each Name with a sheet reference, like "Vout_1". But
I'd like to avoid that if possible.

Thanks in advance -
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Using a macro in multiple sheets

I don't believe you can use same names but you may reference your macro to
Activesheet

"Dan" wrote:

Here's the latest thing making my head hurt:

I have a handful of macros which interact with a user to ultimately create a
block diagrm of sorts. The blocks have numbers associated with them, and all
around the blocks are calculations and results based on the exact connections
of the various types of blocks. This isn't a trivial macro (for me anyway).

Now, I would like to able to run my macros on another sheet in the same
workbook, without affecting the first sheet. But since I am using Names, I
seem to be stuck.
That is, I can't use the same Name on two different sheets. And I need to.
Is there a way to restrict reference to a Name to the sheet where it is
defined ONLY? In this project, one of the objectives is to end up with the
Names in the various equations (for ease of understanding the results). So I
don't want to resort to using "Sheet1:C24" type references.

I suppose I could "tag" each Name with a sheet reference, like "Vout_1". But
I'd like to avoid that if possible.

Thanks in advance -

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
Macro for summarizing multiple sheets Validlyte Excel Worksheet Functions 1 February 19th 10 07:33 PM
same macro on multiple sheets [email protected] Excel Programming 4 February 4th 07 10:19 PM
selecting multiple sheets in a macro Big Al[_3_] Excel Programming 6 September 10th 05 10:38 PM
Macro to Rename Multiple Sheets Alan Excel Programming 1 January 9th 04 04:38 PM
Macro For Filtering on Multiple Sheets Rick[_13_] Excel Programming 0 August 25th 03 02:40 AM


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