Frage zu Makro
09.02.2004 09:00:08
meteofrog
Sub ImportCSV()
Dim sPath As String, sFile As String
sPath = ThisWorkbook.Path & "\"
If Day(Date) > 1 Then
sFile = Format(DateSerial(Year(Date), Month(Date), 1), "myyyy") & ".csv"
Else
sFile = Format(DateSerial(Year(Date), Month(Date) - 1, 1), "myyyy") & ".csv"
End If
Workbooks.Open sPath & sFile
End Sub
Wie sieht der Pfad aus bzw. wie muss die Zeile dann heissen, wenn die Datei auf C:\...\... liegt?
Danke für die Hilfe.
Meteofrog