Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Worksheet/chart tabs changed names! | Charts and Charting in Excel | |||
Recorded macro | Excel Discussion (Misc queries) | |||
How to FIX Recorded Macro | Excel Discussion (Misc queries) | |||
Recorded Macro | New Users to Excel | |||
I recorded a macro, how can i share it with others? | Excel Worksheet Functions |