Smithgall
Board Regular
- Joined
- May 24, 2006
- Messages
- 68
i am trying to name the sheets on file to the value in a cell. I have the code on how to change the sheet name but the value i am trying to use should be a combination of the date and the job number.
So
B2 = 09/08/06 (which is formatted to read Friday, Sep 8, 2006)
B3 = 123654 (job Number)
I want A1 to equal 090806 #123654
and then the sheet will read A1 and equal the same as A1.
As you know the sheet will not accept the dashes or any other characters. Btw i am using the following code to label the sheets
Sub Changetabname()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Activate
ws.Name = Range("$A1").Value
Next
End Sub
So
B2 = 09/08/06 (which is formatted to read Friday, Sep 8, 2006)
B3 = 123654 (job Number)
I want A1 to equal 090806 #123654
and then the sheet will read A1 and equal the same as A1.
As you know the sheet will not accept the dashes or any other characters. Btw i am using the following code to label the sheets
Sub Changetabname()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Activate
ws.Name = Range("$A1").Value
Next
End Sub