Sub LissuSkapaLänkarOK()
Dim intR As Long, intG As Long, intB As Long
Dim wrbBok As Workbook, wrsAktivtBlad As Worksheet, wsBlad As Worksheet
Dim strTYP As String
Set wrbBok = ActiveWorkbook: Set wrsAktivtBlad = ActiveSheet
Sheets("Innehåll").Select:
'rad och kolumn där vi vill börja skriva ut länklistan
intRAD = 4: intKOL = 2
'slinga som går igenom alla kalkylblad
For Each wsBlad In wrbBok.Worksheets
If wsBlad.Visible = True Then
'skapa länkarna
If wsBlad.Name <> wrsAktivtBlad.Name Then
wrsAktivtBlad.Hyperlinks.Add wrsAktivtBlad.Cells(intRAD, intKOL), _
"", SubAddress:="'" & wsBlad.Name & "'!A1", _
TextToDisplay:=wsBlad.Name
End If
End If
NastaBlad:
Next wsBlad
End Sub