VBA xlsTabelle in Textformat speicher.
14.09.2004 11:08:58
Fred
Datumsproblem gelöst.
Aus Zellwert wird Komma zum Punkt.
Modul
Windows("Auswertung-2004.xls").Activate
Sheets("Menue").Select
MoEx = Range("I67") ' Dateiname (z.B. "ExJan")
MoEx1 = (MoEx & ".xls")
MoEx2 = (MoEx & ".txt")
Workbooks.Open("C:\ENZ-Vertrieb\DB\" & MoEx1).Activate
'****Datumsformat in Text umwandeln*********
Tk = "'" 'Zellen als Text
For x = 2 To 5000
Ta = Range("a" & x)
If Ta = "" Then GoTo 10
Ta1 = (Tk & Ta)
Range("a" & x) = Ta1
Next x
'********als Text speichern************************
10 Windows(MoEx1).Activate
ActiveWorkbook.SaveAs Filename:=("C:\ENZ-Vertrieb\DB\" & MoEx2), _
FileFormat:=xlText, CreateBackup:=CreateBackup = False
Windows(MoEx2).Activate ' ist angelegt nicht speichern
ActiveWorkbook.Saved = True
ActiveWindow.Closeodul:
Danke Fred