griffinwebnet
New Member
- Joined
- Aug 4, 2011
- Messages
- 4
Ello All,
Ok, i have the extractor working, but what it currently does is extract the link and put it one cell to the right, but sometimes there is data in that cell that i dont want to replace. So i want to basically turn this (My current code):
Into this which prompts for a destination column:
(By the way, i did not write the second one, which is why i cant seem to merge them. Im not entirely sure how it works.)
Thanks In Advance,
-JL
Ok, i have the extractor working, but what it currently does is extract the link and put it one cell to the right, but sometimes there is data in that cell that i dont want to replace. So i want to basically turn this (My current code):
Code:
Sub ExtractHL()
'Extracts the destination of all hyperlinks
Dim HL As Hyperlink
For Each HL In ActiveSheet.Hyperlinks
HL.Range.Offset(0, 1).Value = HL.Address
Next
End Sub
Into this which prompts for a destination column:
Code:
Public Sub GetHyperlinksImg()
Dim Shp As Shape
Dim rngDestination As Range
Set rngDestination = Application.InputBox( _
Prompt:="Select any cell in the column " & _
"to receive the hyperlink names.", _
Title:="Destination Column", _
Default:=Selection.Address, _
Type:=8)
For Each Shp In ActiveSheet.Shapes
If Shp.Type = 13 Then
On Error Resume Next
Cells(Shp.TopLeftCell.Row, _
rngDestination.Column).Value = _
Shp.Hyperlink.Name
End If
Next Shp
End Sub
(By the way, i did not write the second one, which is why i cant seem to merge them. Im not entirely sure how it works.)
Thanks In Advance,
-JL