Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Naming worksheets within a macro
Hi
I want to create a macro that copies data from an Access table to an Excel worksheet, inserting a new worksheet each week, copying the data on to it and naming it (the worksheet) with the date the data was copied. So I would have a series of worksheets named 1 Nov 06, 8 Nov 06, 15 Nov 06 etc. Is there a way I can get the macro to name each new worksheet sequentially like this? Many thanks GLS -- GLS |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Naming worksheets within a macro
Here is a start:
Sub Macro1() Sheets.Add ActiveSheet.Name = Application.WorksheetFunction.Text(Now, "dd mmm yy") End Sub This will insert a new sheet in the workbook and assign it today's date as the tab name. -- Gary's Student "GLS" wrote: Hi I want to create a macro that copies data from an Access table to an Excel worksheet, inserting a new worksheet each week, copying the data on to it and naming it (the worksheet) with the date the data was copied. So I would have a series of worksheets named 1 Nov 06, 8 Nov 06, 15 Nov 06 etc. Is there a way I can get the macro to name each new worksheet sequentially like this? Many thanks GLS -- GLS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I email amacro? | Excel Worksheet Functions | |||
How to stop Excel remembering/loading macro from previously opened Workbook | Excel Discussion (Misc queries) | |||
I need help makeing a macro to print charts and worksheets | Excel Discussion (Misc queries) | |||
Applying same macro to all worksheets in workbook | Excel Discussion (Misc queries) | |||
Macro to change worksheets in the same workbook | Excel Discussion (Misc queries) |