Timestamp a worksheet tab?

nightracer

Board Regular
Joined
May 17, 2004
Messages
147
Office Version
  1. 365
Hi

At various points during the day I run a macro to take a copy of a worksheet to show work processed up to that point in the day.

So I start the day with the single sheet that takes in the data and then by days end I might have 6 sheets in the workbook, having taken 5 snapshots during the day.

Is it possible to timestamp those worksheets with the date/time (or just time if easier) they were created as the sheet tab name?

Many thanks, hope that makes sense.
Nightracer
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Sheet names can not have / or : in them so I replaced them with the -
Change Sheet1 to the name of your tab

Code:
Sub tstab()
mytime = Format(Now, "mm-dd-yy h-mm AM/PM")
Worksheets("[COLOR=#ff0000]Sheet1[/COLOR]").Copy After:=Worksheets(1)
ActiveSheet.Name = mytime
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top