Sub Add_Sheets_Link()
For i = 1 To ThisWorkbook.Worksheets.Count
Worksheets(i).Hyperlinks.Add Anchor:=Worksheets(i).Cells(1, 4), Address:="D:\Projects\Hartford\Lookup and Metadata Tables -link.xlsm", SubAddress:= _
"Inventory!A1", TextToDisplay:="返回目录"
Next
End Sub
'Address means the absolutely directory of document
'SubAddress means the name you want to link back for those sub sheet
If you want link back to exactly sheet that contain the sheet name cell,change following code:
"Inventory!A1", TextToDisplay:="返回目录" ----->"Inventory!B"&i, TextToDisplay:="返回目录"
浙公网安备 33010602011771号