ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Name Tab With Date (https://www.excelbanter.com/excel-programming/310207-name-tab-date.html)

Blue

Name Tab With Date
 
I have code to add a new sheet to a workbook but I want to name the tab
with today's date as the new sheet is created in the format DD-MMM

Thanks Blue



JE McGimpsey

Name Tab With Date
 
one way:

Worksheets.Add.Name = Format(Date, "dd-mmm")

In article ,
"Blue" wrote:

I have code to add a new sheet to a workbook but I want to name the tab
with today's date as the new sheet is created in the format DD-MMM

Thanks Blue


DonB

Name Tab With Date
 
Try this:

activeworkbook.sheets.add
activesheet.name = format(Now, "dd-mmm")

"Blue" wrote:

I have code to add a new sheet to a workbook but I want to name the tab
with today's date as the new sheet is created in the format DD-MMM

Thanks Blue




Blue

Name Tab With Date
 
Thanks for the quick replies




All times are GMT +1. The time now is 07:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com