hab leider ein kleines Excel-Problem :-(
Ich möchte gerne nur die Tabelle1 als .txt-Datei speichern.
Vielen Dank im Vorraus
Gruß Philipp
hab leider ein kleines Excel-Problem :-(
Ich möchte gerne nur die Tabelle1 als .txt-Datei speichern.
Vielen Dank im Vorraus
Gruß Philipp
Sub create_txt()
Dim intRow As Integer, intColCount As Integer, intCol As Integer
Dim strTmp, fileandpath As String
fileandpath = ActiveSheet.Parent.Path & "\datei.txt"
Worksheets("TXT-Daten").Activate
intColCount = Range("A1:E67").CurrentRegion.Columns.Count
intRow = 1
Open fileandpath For Output As #1
Do Until intRow = 70 'IsEmpty(Cells(intRow, 1))
strTmp = ""
For intCol = 1 To intColCount
If strTmp <> "" Then
strTmp = strTmp & " " & Cells(intRow, intCol)
Else
strTmp = Cells(intRow, intCol)
End If
Next intCol
Print #1, strTmp
intRow = intRow + 1
Loop
Close
Worksheets("Eingabedaten").Activate
MsgBox " TXT-Datei " & fileandpath & " wurde erzeugt !"
End Sub
Die erweiterte Suchfunktion hilft dir, gezielt die besten Antworten zu finden
Suche nach den besten AntwortenEntdecke unsere meistgeklickten Beiträge in der Google Suche
Top 100 Threads jetzt ansehen