Csv-Datei...
30.09.2003 10:18:18
Rob
Ich muss hier ein Makro erstellen, das eine csv Datei einliest...
Habe mich schon etwas im Forum umgeschaut und auch etwas gefunden.
Diesen Quellcode hab ich mir zusammengeklaut:
Option Explicit
Sub Import()
Dim fFile1 As Variant, neuFile As Variant
Dim DateiName1 As String, neuDateiName As String
fFile1 = Application.GetOpenFilename("CSV-Report (*.csv), *.csv")
If fFile1 = False Then
If Workbooks.Count = 1 Then
Application.Quit
Exit Sub
Else
ThisWorkbook.Close
Exit Sub
End If
End If
Workbooks.Open FileName:=fFile1
DateiName1 = ActiveWorkbook.Name
neuFile = Application.GetSaveAsFilename("Wochenbericht.xls")
If neuFile = False Then
MsgBox "Der Vorgang wird vorzeitig abgebrochen."
End If
Workbooks.Add
ActiveWorkbook.SaveAs neuFile
neuDateiName = ActiveWorkbook.Name
End Sub
Mein Problem ist, dass die Werte nicht in der neuen Datei angezeigt, bzw. gespeichert werden. Kenne mich leider gar nicht mit VB aus...
Kann mir jemand helfen, wo mein Problem liegt?
Gr. Rob