Finished the last of my accounts project
A macro that will rename the worksheet based on the data displayed in cell B3
For example if column B has hotel names then worksheet to run a macro that changes worksheet name from Sheet1 to the hotel name contained in B3
[code]
Sub RenameTabs()
' Renames all worksheet tabs with each worksheet's cell A1 contents.
'If cell A1 has no content, then that tab is not renamed.
For i = 1 To ActiveWorkbook.Worksheets.Count
If Worksheets(i).Range("B3").Value <> "" Then
Sheets(i).Name = Worksheets(i).Range("B3").Value
End If
Next
End Sub
[/code]
Thank you Lord....
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.