I'm running into an issue I'm hoping someone can lend a hand with.
I have an index sheet on my workbook that has an overview of all other sheets in the workbook. I'm attempting to automate creating a hyperlink to the individual sheets on the index sheet.
I've automated the process to the point where the link is created, but I cannot figure out how to have the hyperlink point to the sheet where the information was copied from. Here's what I have so far:
Sub PasteOverview()
With ActiveSheet
Link = Range("D3")
Range("B42:J42").Select
Selection.Copy
Range("A1").Select
Sheets("Active").Select
Cells(Range("B10000").End(xlUp).Row + 1, 2).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveSheet.Paste Link:=True
Range("C" & (ActiveCell.Row)).Select
ActiveSheet.Hyperlinks.Add ActiveCell, "", "Link"
End With
End Sub
I just can't figure out how to have the hyperlink point to the sheet the information was copied from. Any help would be greatly appreciated.
EDIT: Re-reading through my question I see the wording was poor, as it was unclear if I wanted to hyperlink to the last active sheet or the sheet where the information was originally copied from. I have reworded the question to clarify.