Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

Als .txt speichern

Forumthread: Als .txt speichern

Als .txt speichern
30.04.2003 07:43:39
Philipp
Morgen zusammen,

hab leider ein kleines Excel-Problem :-(

Ich möchte gerne nur die Tabelle1 als .txt-Datei speichern.

Vielen Dank im Vorraus

Gruß Philipp

Anzeige

1
Beitrag zum Forumthread
Beitrag zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
Re: Als .txt speichern
30.04.2003 08:43:22
Richard M.

Hallo Philipp,
ich hab das Problem so gelöst:

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


Anzeige
;

Forumthreads zu verwandten Themen

Anzeige
Anzeige
Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige