Created
July 21, 2017 09:36
-
-
Save ndthanh/6d49058cbdd5b76813dd298d1e407eea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub AutoFillSheetNames() | |
| 'Update 20131202 | |
| Dim ActRng As Range | |
| Dim ActWsName As String | |
| Dim ActAddress As String | |
| Dim Ws As Worksheet | |
| On Error Resume Next | |
| xTitleId = "Hoc Excel Online" | |
| Set ActRng = Application.ActiveCell | |
| ActWsName = Application.ActiveSheet.Name | |
| ActAddress = ActRng.Address(False, False) | |
| Application.ScreenUpdating = False | |
| xIndex = 0 | |
| For Each Ws In Application.Worksheets | |
| If Ws.Name <> ActWsName Then | |
| ActRng.Offset(xIndex, 0).Value = "='" & Ws.Name & "'!" & ActAddress | |
| xIndex = xIndex + 1 | |
| End If | |
| Next | |
| Application.ScreenUpdating = True | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment