How to find/replace all of the names of files in EXCEL workbook.
I have assumend sheetnames are month(day) ie March1, March 2 etc if this is
incorrect simply swap the x around.
Sub renameall()
x = 1
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Name = MonthName(Month(Now())) & x
x = x + 1
Next ws
End Sub
"Peter Multach" wrote:
If you have a workbook in EXCEL with one sheet for each day of the month, how
can you change all of the names of the sheets at one time for the new month?
|