Does anyone know how to rename the sheet name with a date? Everytime I write the macro to rename the sheet it shows the date with slashes (1/29/10) even though the date in the cell is formatted with dahses (1-29-10).
Using macro like this
ActiveSheet().Select
ActiveSheet.Name=Range(“A47”)
BTW…you don’t have to Select the ActiveSheet, it’s already “selected” since it’s Active.
In addition, you rarely have to Select an object to perform a VBA Action on it.
ActiveSheet.Name = “My Sheet Name”
or
Sheets(1).Name = “My Sheet Name”
is more efficient.
The same goes for cell ranges, text boxes, whatever.
Instead of:
Range(“A1:A100”).Select
Selection.Interior.ColorIndex = 3
use
Range(“A1:A100”).Interior.ColorIndex = 3