Hi all,
I'm having a slight issue with my date formats which can be seen on the attached file. I am trying to use the code (below) in VBA to change the names of a large number of worksheets. I am using the Cell C2 as the value to name the worksheet which is a vlookup from the Lists worksheet. The problem I think I am having is that the date format in column B of the 'Lists' worksheet is in the dd/mm/yyyy format even though it displays as dd-mmm-yy. Therefore when I run the code in VBA I am assuming it is picking up the "/" which cannot be used in the sheetname. Is there any way to change the format of the cell so that it is displaying say a "-" instead of "/"?
Sub RenameWS()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Activate
ws.Name = Range("C2").Value
Next
End Sub
Thanks in advance.
ICS
Bookmarks