Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default Macro recorded... tabs & file names changed, macro hangs

If have recorded a macro that selects various tabs ( sample 1)

and another macro that indicates the name of the file ( sample 2).

sample 1 Sheets(Array("MasterTab", "Data 10-28-09", "Tdata
10-28-09")).Copy

sample 2 Windows("BASEOct28.xls").Activate

Being that I rename the various tabs when I update them ( 10-29, etc), and
also save the file as the updated date (BaseOct29.xls), the macros do not
work because they're looking for the tabs with the 10-28 date, which have
been re-named 10-29, and same for the file. Is there a way to have the macro
work with the new dates ?

Thanks,

Steve
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 96
Default Macro recorded... tabs & file names changed, macro hangs

Maybe like this:

Sheets(Array("MasterTab", "Data " & Format(Date, "MM-DD-YY"), "Tdata " &
Format(Date, "MM-DD-YY"))).Copy

That would convert the second two tabs to today's date.
--
"Actually, I *am* a rocket scientist." -- JB
(www.MadRocketScientist.com)

Your feedback is appreciated, click YES if this post helped you.


"Steve" wrote:

If have recorded a macro that selects various tabs ( sample 1)

and another macro that indicates the name of the file ( sample 2).

sample 1 Sheets(Array("MasterTab", "Data 10-28-09", "Tdata
10-28-09")).Copy

sample 2 Windows("BASEOct28.xls").Activate

Being that I rename the various tabs when I update them ( 10-29, etc), and
also save the file as the updated date (BaseOct29.xls), the macros do not
work because they're looking for the tabs with the 10-28 date, which have
been re-named 10-29, and same for the file. Is there a way to have the macro
work with the new dates ?

Thanks,

Steve

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 96
Default Macro recorded... tabs & file names changed, macro hangs

And for sample2:

Windows("BASE" & Format(Date, "MMMDD") & ".xls").Activate

Does that help?
--
"Actually, I *am* a rocket scientist." -- JB
(www.MadRocketScientist.com)

Your feedback is appreciated, click YES if this post helped you.


"Steve" wrote:

If have recorded a macro that selects various tabs ( sample 1)

and another macro that indicates the name of the file ( sample 2).

sample 1 Sheets(Array("MasterTab", "Data 10-28-09", "Tdata
10-28-09")).Copy

sample 2 Windows("BASEOct28.xls").Activate

Being that I rename the various tabs when I update them ( 10-29, etc), and
also save the file as the updated date (BaseOct29.xls), the macros do not
work because they're looking for the tabs with the 10-28 date, which have
been re-named 10-29, and same for the file. Is there a way to have the macro
work with the new dates ?

Thanks,

Steve

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default Macro recorded... tabs & file names changed, macro hangs

I haven't tried this yet, but I will. However, I only change the dates on the
tabs and the file if I make changes to them. E.g., these changes would use
todays date, but the tabs or even file may have not been updated for a week,
and they'd still have a prior days date on them, then the macro would not
work, correct ? I guess what I was thinking of is like when you change the
name of a tab that's in a formula, the formula changes to that new tab name.
Or something like that.

Thanks,

Steve

"JBeaucaire" wrote:

Maybe like this:

Sheets(Array("MasterTab", "Data " & Format(Date, "MM-DD-YY"), "Tdata " &
Format(Date, "MM-DD-YY"))).Copy

That would convert the second two tabs to today's date.
--
"Actually, I *am* a rocket scientist." -- JB
(www.MadRocketScientist.com)

Your feedback is appreciated, click YES if this post helped you.


"Steve" wrote:

If have recorded a macro that selects various tabs ( sample 1)

and another macro that indicates the name of the file ( sample 2).

sample 1 Sheets(Array("MasterTab", "Data 10-28-09", "Tdata
10-28-09")).Copy

sample 2 Windows("BASEOct28.xls").Activate

Being that I rename the various tabs when I update them ( 10-29, etc), and
also save the file as the updated date (BaseOct29.xls), the macros do not
work because they're looking for the tabs with the 10-28 date, which have
been re-named 10-29, and same for the file. Is there a way to have the macro
work with the new dates ?

Thanks,

Steve

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
Worksheet/chart tabs changed names! wgnewman Charts and Charting in Excel 16 February 24th 10 02:22 PM
Recorded macro Gaurav[_3_] Excel Discussion (Misc queries) 4 September 22nd 08 06:46 PM
How to FIX Recorded Macro JMay Excel Discussion (Misc queries) 7 May 23rd 07 04:13 AM
Recorded Macro want to know New Users to Excel 5 February 14th 07 12:46 PM
I recorded a macro, how can i share it with others? TA Excel Worksheet Functions 1 September 8th 06 08:09 PM


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