Solution Required
Hi Akash,
When you open de VBE (using Alt-F11) and make the properties visible
( using F4) you can see that each sheet has a property “(name)” and a
property “name”. The first is the internal name, the second is the
name shown on the tab to the users. You can use this in VBA:
Start with making the internal names similar as the names you want on
the tab, without the month abbreviation. Keep in mind that a space in
not allowed in this internal name. I suggest a underscore instead.
EG: Item_1, Item_2, etc.
Then create a vba program to change the shown name, something like:
Sub RemaneAllSheets()
' using References:
' Visual Basic for Applications
' Microsoft Excel Object Library
Dim strExternal As String
Dim shtLoopSheet As Worksheet
For Each shtLoopSheet In ThisWorkbook.Worksheets
With shtLoopSheet
If InStr(1, .CodeName, "Item") = 1 Then
strExternal = .CodeName & Format(Date, " mmm")
shtLoopSheet.Name = Replace(strExternal, "_", " ")
End If
End With
Next
End Sub
This will use the abbreviation of the current month
I used Excel 2007 to create the macro, but I am pretty sure it will
work in previous versions.
Hoop This Helps,
Radareye.
|