Public
Sub
import()
Dim
Datei, iFile
Dim
FSO
Dim
Str_String
As
String
Dim
Spalte
As
Long
Spalte = 2
Do
While
Cells(Spalte, 1).Value <>
""
Set
FSO = CreateObject(
"Scripting.FilesystemObject"
)
Set
Datei = FSO.OpentextFile(
"E:\Eigene Dateien\muster.GEO"
)
Str_String = Datei.readall
Datei.Close
Str_String = Replace(Str_String,
"laenge"
, Range(
"A"
& Spalte))
Str_String = Replace(Str_String,
"breite"
, Range(
"B"
& Spalte))
Str_String = Replace(Str_String,
"anzahll"
, Range(
"E"
& Spalte))
Str_String = Replace(Str_String,
"lochx"
, Range(
"F"
& Spalte))
Str_String = Replace(Str_String,
"lochy"
, Range(
"G"
& Spalte))
Str_String = Replace(Str_String,
"mmquad"
, Range(
"C"
& Spalte))
Spalte = Spalte + 1
Debug.Print Left(Str_String, 100)
Loop
iFile =
"c:\temp\FSO_Test.txt"
Set
iOut = FSO.CreateTextFile(iFile,
True
,
True
)
iOut.WriteLine Str_String
iOut.close
End
Sub