AW: Was stimmt denn da nicht?
03.06.2005 11:32:50
Ramses
Hallo
lass das mal laufen
Sub Create_Hyperlink_Table_of_Contents()
'(C) Ramses
'Erstellt ein Inhaltsverzeichnis auf alle Tabellen einer
'Mappe mit Hyperlinks auf die jeweiligen Tabellen
Dim tarwks As Worksheet
Dim i As Integer
'Blattnamen anpassen
Set tarwks = Worksheets("Inhalt")
'Bestehenden Inhalt löschen
tarwks.Columns(1).ClearContents
tarwks.Cells(1, 1) = "Inhalt"
'Erstellen des Inhaltsverzeichnisses
For i = 2 To Worksheets.count
tarwks.Cells(i, 1) = Worksheets(i).name
Cells(i, 1).Hyperlinks.Add Anchor:=Cells(i, 1), Address:="", SubAddress:=Worksheets(i).name & "!A1", TextToDisplay:=Worksheets(i).name
Next i
'Sortiert das Inhaltsverzeichnis
tarwks.Columns(1).Sort Key1:=tarwks.Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
Gruss Rainer