drayneal
New Member
- Joined
- Feb 4, 2008
- Messages
- 10
Hello gurus, I need VBA help. I've searched the forums but found nothing specific to worksheet names. I have a workbook that creates an inventory catalog based on the date. The user wants the date name on the workbook sheet tab, which I have done. However it changes each time its opened. Can the code be made non-volitile.
I'm a novice so go easy. There's a lot more code but this is the relevant part.
Sub DateSheet()
Dim TB As Worksheet
Dim dt As String
dt = Format(Date, "mmm-dd-yyyy")
Set TB = ActiveSheet
TB.Copy after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = CStr(dt) & " Stock Cat Alpha"
End Sub

Sub DateSheet()
Dim TB As Worksheet
Dim dt As String
dt = Format(Date, "mmm-dd-yyyy")
Set TB = ActiveSheet
TB.Copy after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = CStr(dt) & " Stock Cat Alpha"
End Sub