Re: eingelesene Daten anzeigen
23.01.2003 19:00:00
Lutz
Hallo Jens,ich poste mal den Code...wenn nix geht, ist die Statusbar eine Alternative, wenn auch nicht besonders ins Auge springend...
Gruß Lutz
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 = "j:\technik\arbeitszeiterfassung\" & Cells(4, 3) & "\" & Cells(3, 4) & "\"
arrFiles = FileArray(strPath, "*.xls")
strPath = WorksheetFunction.Substitute(strPath, "\", "/")
Set wks = ActiveSheet
For intRow = 1 To UBound(arrFiles)
With wks
.Cells(intRow + 6, 1).Value = arrFiles(intRow)
.Cells(intRow + 6, 2).Value = "='" & strPath & "[" & Cells(intRow + 6, 1) & "]Jahresüberblick'!D7"
.Cells(intRow + 6, 3).Value = "='" & strPath & "[" & Cells(intRow + 6, 1) & "]Jahresüberblick'!I5"
.Cells(intRow + 6, 4).Value = "='" & strPath & "[" & Cells(intRow + 6, 1) & "]Jahresüberblick'!D5"
For cnt = 1 To 55
With wks
.Cells(intRow + 6, cnt + 6).Value = "='" & strPath & "[" & Cells(intRow + 6, 1) & "]Jahresüberblick'!" & Cells(13 + cnt, wks.Index + 5).Address
End With
Next cnt
End With
Next intRow
End Sub