kann man sich Arbeitsmappen in einer Art Übersicht anzeigen lassen und wenn man diese in der Übersicht anklickt, daß automatisch die Arbeitsmappe geöffnet wird?
Vielen Dank im voraus
Stefan
kann man sich Arbeitsmappen in einer Art Übersicht anzeigen lassen und wenn man diese in der Übersicht anklickt, daß automatisch die Arbeitsmappe geöffnet wird?
Vielen Dank im voraus
Stefan
wo willst Du die uebersicht erstellen ?
vielleicht bringt Dich HYPERLINK weiter.
gruss thomas
folgende Code in ein Modul und Pfad anpassen:
Sub DateienEinlesen()
Dim arrFiles As Variant, z As String
Dim intRow As Integer, cnt As Integer, i As Integer
Dim wks As Worksheet
Dim strPath As String
strPath = "d:\privat\visualbasic\lösungen\"
arrFiles = FileArray(strPath, "*.xls")
strPath = WorksheetFunction.Substitute(strPath, "\", "/")
Set wks = ActiveSheet
For intRow = 1 To UBound(arrFiles)
With wks
.Cells(intRow, 1).Value = arrFiles(intRow)
.Cells(intRow, 2).Value = strPath & arrFiles(intRow)
.Cells(intRow, 3).FormulaR1C1 = "=HYPERLINK(RC[-1])"
End With
Next intRow
Application.ScreenUpdating = False
End Sub
Private Function FileArray(strPath As String, strPattern As String)
Dim arrDateien()
Dim intCounter As Integer
Dim strDatei As String
If Right(strPath, 1) <> "\" Then strPath = strPath & "\"
strDatei = Dir(strPath & strPattern)
Do While strDatei <> ""
intCounter = intCounter + 1
ReDim Preserve arrDateien(1 To intCounter)
arrDateien(intCounter) = strDatei
strDatei = Dir()
Loop
FileArray = arrDateien
End Function
Gruß
Lutz