Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JBW JBW is offline
external usenet poster
 
Posts: 42
Default Rename worksheet in macro

I download a file every day, I have a great macro that does a load of stuff
but have realised one shortcoming.

Every day the original worksheets name tab (business system generated)
includes the date, so it changes its name every day.

When I ask my macro to select the tab and change the name as part of the
required tasks, it will stop dead when tomorrow comes and the name has
changed due to the new date.

I'm an obsolute novice VB editor, but would be grateful if anyone can see a
way around this other than getting IT to remove the date field from the tab
name .


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Rename worksheet in macro

You should try and reference the worksheet name tab as ActiveSheet.Name

ActiveSheet.Name = Format(Date, "mmddyy")

"JBW" wrote:

I download a file every day, I have a great macro that does a load of stuff
but have realised one shortcoming.

Every day the original worksheets name tab (business system generated)
includes the date, so it changes its name every day.

When I ask my macro to select the tab and change the name as part of the
required tasks, it will stop dead when tomorrow comes and the name has
changed due to the new date.

I'm an obsolute novice VB editor, but would be grateful if anyone can see a
way around this other than getting IT to remove the date field from the tab
name .


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
Can't rename worksheet Brian Preston Excel Discussion (Misc queries) 1 October 15th 06 03:25 AM
new worksheet and rename from cell contents macro Henry Excel Worksheet Functions 1 September 12th 06 10:35 AM
Using information from one worksheet, to rename inserted worksheet Lyn Excel Worksheet Functions 0 March 24th 06 12:54 AM
why can't I rename my worksheet? cfc1905 Excel Discussion (Misc queries) 2 February 13th 06 03:19 PM
Rename Macro rmpete Excel Discussion (Misc queries) 3 February 11th 06 10:24 PM


All times are GMT +1. The time now is 11:34 AM.

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"