Rename the xls tab with spreadsheet column data using macro

Steps:
- Open the xls > go to view tab > click Marco > Type Macro name > Click create button > Ms visual basic screen will appear > copy paste below macro and save > close.
- Again click on view macro and select the saved macro and run it.
- It will rename the tab name w.r.t A1 column
- If you don’t want keep the macro in the xls, just delete b’coz people does't like opening any xls with macro

Sub Test()
For i = 1 To Sheets.Count
Worksheets(i).Name = Sheets(i).Range("A1").Value
Next
End Sub

Comments

Popular posts from this blog

RSV-VAL-0032 expression is not valid. If the item exists in a query but is not referenced in the layout, add it to a property list. CRX-API-0005 An error ocurred at or near the position '0'.

How can you extract all user information from Cognos Access Manager Namespace Report Utility and create Cognos Report out of it?

BME-EX-0047 Unable to read preferences for the requested interface..