Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Code Help for naming a worksheet tab
This code works fine with one exception. I only name the new tab with a date
and time stamp. In a cell "U2" the user selects shift too. What I would like if for the code to read both the Date and the cell "U2" shift to name the new tab. So end state I would see a tab named like this (01-01-2009 Shift 3) is there any way to add that to this code. I hope this is enough information. Thanks! Sub SaveSheet() SaveSheet Macro Sheets("DDS").Select Sheets("DDS").Copy Befo=Sheets(3) Sheets("DDS (2)").Select Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("B1").Select Application.CutCopyMode = False Sheets("DDS (2)").Select Sheets("DDS (2)").Name = Format(Now, "yyyy-mm-dd_hh-mm-ss") Range("B1").Select Sheets("DDS").Select Range("B1").Select End Sub -- Thank you for your time! John -- Thank you for your time! John |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Worksheet naming | Excel Discussion (Misc queries) | |||
Naming a reference table for use in a VBA Code | Excel Discussion (Misc queries) | |||
protection de-activating tab-naming code | Excel Worksheet Functions | |||
Naming Worksheet | New Users to Excel | |||
Naming a worksheet help? | Excel Worksheet Functions |