-
Krieger
Hallo July, kennst mich (pssst...damit ich auch ma auf paar Posts komme *g*)
__________________________________________________________________________
Sub Import_csv_finish()
Dim fs As Filesearch, wb As Workbook, i As Integer, wsh As Worksheet
Set fs = Application.Filesearch
Set wsh = ThisWorkbook.Sheets(1)
Const strOrdner As String = "H
Sonstiges"
Const strFName As String = "spider*.csv"
With fs
.Filename = strFName
.LookIn = strOrdner
.SearchSubFolders = False
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
'sind hinter 'spider' 8 Ziffern?
If IsNumeric(Mid(.FoundFiles(i), InStr(.FoundFiles(i), "spider") + 6, 8)) Then
Set wb = Workbooks.Open(.FoundFiles(i))
With wb.Sheets(1)
.Range(.Cells(2, 1), .Cells.SpecialCells(xlLastCell)).Copy _
Destination:=wsh.Cells(65536, 1).End(xlUp).Offset(1, 0)
End With
wb.Close False
Set wb = Nothing
End If
Next i
End If
End With
End Sub
__________________________________________________________________________
Liebe Grüße G_b_G
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- Anhänge hochladen: Nein
- Beiträge bearbeiten: Nein
-
Foren-Regeln