Last active
May 6, 2019 15:31
-
-
Save DataSolveProblems/ed066bee8ef3fd68aed0f2064befef74 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 List_Hyperlinks() | |
Dim ws As Worksheet, wsOutput As Worksheet | |
Dim hlink As Hyperlink | |
Dim row_insert As Long | |
row_insert = 2 | |
Set wsOutput = ThisWorkbook.Worksheets.Add | |
wsOutput.Range("A1").Resize(1, 3).Value = Array("Display Text", "Address", "Sub Address") | |
For Each ws In ThisWorkbook.Worksheets | |
For Each hlink In ws.Hyperlinks | |
With wsOutput | |
.Cells(row_insert, "A").Value = hlink.TextToDisplay | |
.Cells(row_insert, "B").Value = hlink.Address | |
.Cells(row_insert, "C").Value = hlink.SubAddress | |
End With | |
row_insert = row_insert + 1 | |
Next hlink | |
Next ws | |
wsOutput.Cells.EntireColumn.AutoFit | |
MsgBox "Complete." | |
Set wsOutput = Nothing | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment