Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
GLS GLS is offline
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default 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
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
how do I email amacro? leo Excel Worksheet Functions 24 August 9th 06 02:47 PM
How to stop Excel remembering/loading macro from previously opened Workbook Norman Yuan Excel Discussion (Misc queries) 4 June 17th 06 04:13 PM
I need help makeing a macro to print charts and worksheets WiscGirl Excel Discussion (Misc queries) 0 March 1st 06 05:54 AM
Applying same macro to all worksheets in workbook [email protected] Excel Discussion (Misc queries) 2 October 19th 05 11:25 PM
Macro to change worksheets in the same workbook James C Excel Discussion (Misc queries) 2 October 19th 05 08:04 PM


All times are GMT +1. The time now is 05:41 PM.

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"