Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default dealing with multiple named worksheets with one macro

I want one macro to create a chart over a set the same amount of cells no matter what the worksheet or workbook is named. Is there some "activeworksheet" command that I can use in my code that will work no matter what the name is? So far the code is getting hung up on setting the source data with a specific worksheet name. any suggestion would be greatly appreiciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default dealing with multiple named worksheets with one macro

Hi Ray:

ActiveSheet

Regards,

Vasant.

"Ray Morton" wrote in message
...
I want one macro to create a chart over a set the same amount of cells no

matter what the worksheet or workbook is named. Is there some
"activeworksheet" command that I can use in my code that will work no matter
what the name is? So far the code is getting hung up on setting the source
data with a specific worksheet name. any suggestion would be greatly
appreiciated.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default dealing with multiple named worksheets with one macro

If I wanted to change this particular module:
Sheets("tanks006").select
Sheets("tanks006").name="tanks"

How would I go about doing this? I tried using activesheet and it didn't work. I want this name to be able to change to anything and still be able to change what ever it is to "Tanks"
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default dealing with multiple named worksheets with one macro

If you want to select a particular sheet, you need to specify what the sheet
name is or some other way to identify it. ActiveSheet pertains to the
currently visible sheet.


Activesheet.Name = "tanks"

will name the activesheet tanks.

But the challenge is how to identify that it is tanks006 that you want to
rename. The question is how you would identify the sheet you want to
rename?

--
Regards,
Tom Ogilvy

Ray Morton wrote in message
...
If I wanted to change this particular module:
Sheets("tanks006").select
Sheets("tanks006").name="tanks"

How would I go about doing this? I tried using activesheet and it didn't

work. I want this name to be able to change to anything and still be able to
change what ever it is to "Tanks"


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
Sum Multiple Worksheets, same named cell uncreative Excel Worksheet Functions 1 March 12th 10 03:39 AM
Named Ranges - Multiple Worksheets Josh O. Excel Discussion (Misc queries) 3 April 1st 09 07:31 PM
how to make a macro to clear multiple cells from multiple worksheets? [email protected] Excel Worksheet Functions 2 October 18th 07 04:31 PM
same named range on multiple worksheets? Philip Reece-Heal Excel Discussion (Misc queries) 4 June 1st 06 11:37 PM
Need macro to copy a list of named cells between worksheets John Excel Worksheet Functions 3 January 8th 06 11:33 PM


All times are GMT +1. The time now is 04:29 PM.

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

About Us

"It's about Microsoft Excel"