AW: Export txt - Bearbeitung per VBA
28.09.2006 15:46:32
ticonhh
Hallo,
erstmal vielen Dank für Deine Hilfe.
Nur leider tut sich nichts, dh er durchsucht glaube ich
nur die erste Zeile. Kannst mir auf die Sprünge helfen,
wie das ganze Blatt bzw eine bestimmte Spalte mit "find und replace"
bearbeiten kann ?
Dank und Gruss
ticonhh
Public
Sub export()
Dim fileDatum As String
Dim fileBuchungsnummer As String
Dim fileName As String
Dim heute As Date
Dim strPfad As String, strhelp As String
heute = Date
fileBuchungsnummer = ThisWorkbook.Worksheets(2).Cells(2, 6).Value
fileDatum = Format(Date, "mmm") & Right(Year(Date), 2)
fileName = fileDatum & "_PIE_Salaries_" & fileBuchungsnummer & ".txt"
Application.DisplayAlerts = False
ActiveWorkbook.Worksheets("xxx_Journal_Upload").Copy
Workbooks(Workbooks.Count).SaveAs fileName:="O:\xx\x\x\w\c\export_txt\" & fileName, FileFormat:=xlText
ActiveWorkbook.Close False
Application.DisplayAlerts = True
strPfad = "O:\xx\x\x\w\c\export_txt\" & fileName
Open strPfad For Binary As #1
strhelp = Space(LOF(1))
Get #1, , strhelp
Close #1
strhelp = Replace(strhelp, ".", ",")
Open strPfad For Binary As #1
Put #1, , strhelp
Close #1
End Sub