ich möchte ein Tabellenblatt im CSV Format exportieren. Die Spaltentrennung erfolgt bei mir mit Kommatas und ich benötige aber eine Semikolontrennung. Mit dem Befehl "Speichern unter" funktioniert es. Was mache ich falsch?
Ich nutze folgenden Code:
Sub Export_CSV()
Dim oldname$, oldpath$, oldformat
With ActiveWorkbook
oldname = .Name
oldpath = .Path
oldformat = .FileFormat
.ActiveSheet.SaveAs _
Filename:="C:\HDS\ExtbErfas\Export\Export.csv", FileFormat:=xlTextWindows
Columns.AutoFit
Application.DisplayAlerts = False
.SaveAs Filename:=oldpath + "\" + oldname, FileFormat:=oldformat
Application.DisplayAlerts = True
End With
End Sub