Hallo
Ich hab eine Frage bzw ein Problem. Und zwar hab ich in Excel ein Makro geschrieben, was eine Datei öffnet, diese dann zeilenweise einliesst und die eingelesenen Zeilen dann in eine neue Datei aber an eine andere Stelle schreibt.
So jetzt mein Problem, nun soll dieses Makro quasi in Delphi umgewandelt werden.
Ähneln sich die 2 Sprachen? Kann ich den „alten“ Code übernehmen?
Hab von Delphi überhaupt keine Ahnung.
Hab das Makro auch mal gepostet, falls jemand nicht verstanden hat was ich oben meinte.
Bin für jede Antwort dankbar.
mfg
MAKRO:
Sub Geschwindigkeit()
Dim Zeile, Zeile2
Zst = „Ni3308“
ende = „.099“
neu = „NI3308v0909“
Open „d:\Makros\Makro_Geschwindigkeit“ & Zst & „v“ & ende & „“ For Input As #1
Open „d:\Makros\Makro_Geschwindigkeit“ & Zst & „“ & ende & „“ For Input As #3
Open „d:\Makros\Makro_Geschwindigkeit\temp“ & neu & „temp.dat“ For Output As #2
If Zst = „Ni3306“ Then
NahRI = „AS Peine“
NahRII = „AS Hämelerwald“
ElseIf Zst = „Ni3308“ Then
NahRI = „AS Hildesheim“
NahRII = „AS Derneburg/Salzgitter“
ElseIf Zst = „Ni3309“ Then
NahRI = „AS Lohne/Dinklage“
NahRII = „AS Holdorf“
ElseIf Zst = „Ni3351“ Then
NahRI = „AS Hamburg-Harburg“
NahRII = „AK Maschener Kreuz“
ElseIf Zst = „Ni3368“ Then
NahRI = „AS Filsum“
NahRII = „AS Leer-Ost“
ElseIf Zst = „Ni4602“ Then
NahRI = „AS Seesen (Harz)“
NahRII = „AS Echte“
End If
'Kopf Lesen
'Erste Zeile
Line Input #1, Zeile
ZstNr = Mid(Zeile, 6, 4)
TKNr = Mid(Zeile, 2, 4)
ZName = Mid(Zeile, 22, 20)
StrKl = Mid(Zeile, 14, 1)
StrNr = Mid(Zeile, 16, 4)
LandNr = Mid(Zeile, 11, 2)
Zeilenende = Mid(Zeile, 51, 1)
'Zweite Zeile
Line Input #1, Zeile
Richtung1 = Mid(Zeile, 8, 15)
Richtung2 = Mid(Zeile, 30, 15)
AnFSRI = Mid(Zeile, 3, 1)
AnFSRII = Mid(Zeile, 6, 1)
'Dritte Zeile
Line Input #1, Zeile
AnFZGr = Mid(Zeile, 3, 1)
'Vierte Zeile
Line Input #1, Zeile
AnFz1 = Mid(Zeile, 5, 2)
Line Input #1, Zeile
AnFz2 = Mid(Zeile, 5, 2)
Line Input #1, Zeile
Anfz3 = Mid(Zeile, 5, 2)
Line Input #3, Zeile2
Line Input #3, Zeile2
Line Input #3, Zeile2
If AnFZGr = 3 And AnFSRI = 3 Then
'Kopf schreiben
'Erste Zeile
Print #2, Tab(1); TKNr;
Print #2, Tab(5); ZstNr;
Print #2, Tab(10); LandNr;
Print #2, Tab(13); StrKl;
Print #2, Tab(15); StrNr;
Print #2, Tab(22); ZName;
Print #2, Tab(63); „V2.0“;
Print #2, Tab(67); Zeilenende;
'Zweite Zeile
Print #2, Tab(1); AnFSRI;
Print #2, Tab(3); AnFSRII;
Print #2, Tab(5); Richtung1;
Print #2, Tab(41); NahRI;
Print #2, Tab(87); Richtung2;
Print #2, Tab(123); NahRII;
Print #2, Tab(168); Zeilenende;
'Dritte Zeile
Print #2, Tab(1); „S“;
Print #2, Tab(2); AnFZGr;
Print #2, Tab(4); „LVo“;
Print #2, Tab(8); AnFz1;
Print #2, Tab(12); „SGV“;
Print #2, Tab(16); AnFz2;
Print #2, Tab(20); „BPA“;
Print #2, Tab(24); Anfz3;
Print #2, Tab(28); „Ri qSV qGr vm svm v15 v85“;
Print #2, Tab(56); „0 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180“;
Print #2, Tab(120); „0 40 50 60 70 80 90 100 110 120“;
Print #2, Tab(160); „0 40 50 60 70 80 90 100 110 120“;
Print #2, Tab(199); „;“;
Do Until EOF(1)
'Erste Zeile mit Daten (Richtung1)
Line Input #1, Zeile
datum = Mid(Zeile, 1, 6)
zeit = Mid(Zeile, 8, 5)
Print #2, Tab(1); datum;
Print #2, Tab(8); zeit;
Line Input #1, Zeile
Line Input #3, Zeile2
Print #2, Tab(14); Mid(Zeile, 4, 1);
Print #2, Tab(16); Mid(Zeile2, 19, 5) + " " + Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4) + " " + Mid(Zeile, 78, 4) + " " + Mid(Zeile, 82, 4) + " " + Mid(Zeile, 86, 4) + " " + Mid(Zeile, 90, 4) + " " + Mid(Zeile, 94, 4) + " " + Mid(Zeile, 98, 4);
Line Input #1, Zeile
Print #2, Tab(148); Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4);
Line Input #1, Zeile
Print #2, Tab(238); Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4);
Line Input #1, Zeile
Print #2, Tab(328); Mid(Zeile2, 31, 5) + " " + Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4) + " " + Mid(Zeile, 78, 4) + " " + Mid(Zeile, 82, 4) + " " + Mid(Zeile, 86, 4) + " " + Mid(Zeile, 90, 4) + " " + Mid(Zeile, 94, 4) + " " + Mid(Zeile, 98, 4);
Line Input #1, Zeile
Print #2, Tab(460); Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4);
Line Input #1, Zeile
Print #2, Tab(550); Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4);
Line Input #1, Zeile
Print #2, Tab(640); Mid(Zeile2, 43, 5) + " " + Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4) + " " + Mid(Zeile, 78, 4) + " " + Mid(Zeile, 82, 4) + " " + Mid(Zeile, 86, 4) + " " + Mid(Zeile, 90, 4) + " " + Mid(Zeile, 94, 4) + " " + Mid(Zeile, 98, 4);
Line Input #1, Zeile
Print #2, Tab(772); Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4);
Line Input #1, Zeile
Print #2, Tab(862); Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4)
'Zweite Zeile mit Daten (Richtung2)
Print #2, Tab(1); datum;
Print #2, Tab(8); zeit;
Line Input #1, Zeile
Print #2, Tab(14); Mid(Zeile, 4, 1);
F3Vgr1 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4) + " " + Mid(Zeile, 78, 4) + " " + Mid(Zeile, 82, 4) + " " + Mid(Zeile, 86, 4) + " " + Mid(Zeile, 90, 4) + " " + Mid(Zeile, 94, 4) + " " + Mid(Zeile, 98, 4)
Line Input #1, Zeile
F3Vgr2 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4)
Line Input #1, Zeile
F3Vgr3 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4)
Line Input #1, Zeile
F2Vgr1 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4) + " " + Mid(Zeile, 78, 4) + " " + Mid(Zeile, 82, 4) + " " + Mid(Zeile, 86, 4) + " " + Mid(Zeile, 90, 4) + " " + Mid(Zeile, 94, 4) + " " + Mid(Zeile, 98, 4)
Line Input #1, Zeile
F2Vgr2 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4)
Line Input #1, Zeile
F2Vgr3 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4)
Line Input #1, Zeile
F1Vgr1 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4) + " " + Mid(Zeile, 78, 4) + " " + Mid(Zeile, 82, 4) + " " + Mid(Zeile, 86, 4) + " " + Mid(Zeile, 90, 4) + " " + Mid(Zeile, 94, 4) + " " + Mid(Zeile, 98, 4)
Line Input #1, Zeile
F1Vgr2 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4)
Line Input #1, Zeile
F1Vgr3 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4)
Print #2, Tab(16); Mid(Zeile2, 79, 5);
Print #2, Tab(22); F1Vgr1;
Print #2, Tab(148); F1Vgr2;
Print #2, Tab(238); F1Vgr3;
Print #2, Tab(328); Mid(Zeile2, 67, 5);
Print #2, Tab(334); F2Vgr1;
Print #2, Tab(460); F2Vgr2;
Print #2, Tab(550); F2Vgr3;
Print #2, Tab(640); Mid(Zeile2, 55, 5);
Print #2, Tab(646); F3Vgr1;
Print #2, Tab(772); F3Vgr2;
Print #2, Tab(862); F3Vgr3;
Loop
Close #1
Close #2
Close #3
ElseIf AnFZGr = 3 And AnFSRI = 2 Then
'Kopf schreiben
'Erste Zeile
Print #2, Tab(1); TKNr;
Print #2, Tab(5); ZstNr;
Print #2, Tab(10); LandNr;
Print #2, Tab(13); StrKl;
Print #2, Tab(15); StrNr;
Print #2, Tab(22); ZName;
Print #2, Tab(63); „V2.0“;
Print #2, Tab(67); Zeilenende;
'Zweite Zeile
Print #2, Tab(1); AnFSRI;
Print #2, Tab(3); AnFSRII;
Print #2, Tab(5); Richtung1;
Print #2, Tab(41); NahRI;
Print #2, Tab(87); Richtung2;
Print #2, Tab(123); NahRII;
Print #2, Tab(168); Zeilenende;
'Dritte Zeile
Print #2, Tab(1); „S“;
Print #2, Tab(2); AnFZGr;
Print #2, Tab(4); „LVo“;
Print #2, Tab(8); AnFz1;
Print #2, Tab(12); „SGV“;
Print #2, Tab(16); AnFz2;
Print #2, Tab(20); „BPA“;
Print #2, Tab(24); Anfz3;
Print #2, Tab(28); „Ri qSV qGr vm svm v15 v85“;
Print #2, Tab(56); „0 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180“;
Print #2, Tab(120); „0 40 50 60 70 80 90 100 110 120“;
Print #2, Tab(160); „0 40 50 60 70 80 90 100 110 120“;
Print #2, Tab(199); „;“;
Do Until EOF(1)
'Erste Zeile mit Daten (Richtung1)
Line Input #1, Zeile
datum = Mid(Zeile, 1, 6)
zeit = Mid(Zeile, 8, 5)
Print #2, Tab(1); datum;
Print #2, Tab(8); zeit;
Line Input #1, Zeile
Line Input #3, Zeile2
Print #2, Tab(14); Mid(Zeile, 4, 1);
Print #2, Tab(16); Mid(Zeile2, 19, 5) + " " + Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4) + " " + Mid(Zeile, 78, 4) + " " + Mid(Zeile, 82, 4) + " " + Mid(Zeile, 86, 4) + " " + Mid(Zeile, 90, 4) + " " + Mid(Zeile, 94, 4) + " " + Mid(Zeile, 98, 4);
Line Input #1, Zeile
Print #2, Tab(148); Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4);
Line Input #1, Zeile
Print #2, Tab(238); Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4);
Line Input #1, Zeile
Print #2, Tab(328); Mid(Zeile2, 31, 5) + " " + Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4) + " " + Mid(Zeile, 78, 4) + " " + Mid(Zeile, 82, 4) + " " + Mid(Zeile, 86, 4) + " " + Mid(Zeile, 90, 4) + " " + Mid(Zeile, 94, 4) + " " + Mid(Zeile, 98, 4);
Line Input #1, Zeile
Print #2, Tab(460); Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4);
Line Input #1, Zeile
Print #2, Tab(550); Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4);
'Zweite Zeile mit Daten (Richtung2)
Print #2, Tab(1); datum;
Print #2, Tab(8); zeit;
Line Input #1, Zeile
Print #2, Tab(14); Mid(Zeile, 4, 1);
F2Vgr1 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4) + " " + Mid(Zeile, 78, 4) + " " + Mid(Zeile, 82, 4) + " " + Mid(Zeile, 86, 4) + " " + Mid(Zeile, 90, 4) + " " + Mid(Zeile, 94, 4) + " " + Mid(Zeile, 98, 4)
Line Input #1, Zeile
F2Vgr2 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4)
Line Input #1, Zeile
F2Vgr3 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4)
Line Input #1, Zeile
F1Vgr1 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4) + " " + Mid(Zeile, 78, 4) + " " + Mid(Zeile, 82, 4) + " " + Mid(Zeile, 86, 4) + " " + Mid(Zeile, 90, 4) + " " + Mid(Zeile, 94, 4) + " " + Mid(Zeile, 98, 4)
Line Input #1, Zeile
F1Vgr2 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4)
Line Input #1, Zeile
F1Vgr3 = Mid(Zeile, 13, 17) + " " + Mid(Zeile, 30, 4) + " " + Mid(Zeile, 34, 4) + " " + Mid(Zeile, 38, 4) + " " + Mid(Zeile, 42, 4) + " " + Mid(Zeile, 46, 4) + " " + Mid(Zeile, 50, 4) + " " + Mid(Zeile, 54, 4) + " " + Mid(Zeile, 58, 4) + " " + Mid(Zeile, 62, 4) + " " + Mid(Zeile, 66, 4) + " " + Mid(Zeile, 70, 4) + " " + Mid(Zeile, 74, 4)
Print #2, Tab(16); Mid(Zeile2, 55, 5);
Print #2, Tab(22); F1Vgr1;
Print #2, Tab(148); F1Vgr2;
Print #2, Tab(238); F1Vgr3;
Print #2, Tab(328); Mid(Zeile2, 43, 5);
Print #2, Tab(334); F2Vgr1;
Print #2, Tab(460); F2Vgr2;
Print #2, Tab(550); F2Vgr3;
Loop
Close #1
Close #2
Close #3
Else
MsgBox („Fehler! Anzahl Fahrstreifen oder Fahrzeuggruppen nicht programmiert!!“)
End If
Open „d:\Makros\Makro_Geschwindigkeit\temp“ & neu & „temp.dat“ For Input As #4
Open „d:\Makros\Makro_Geschwindigkeit\V-neu“ & neu & „.dat“ For Output As #5
Line Input #4, Zeile
Print #5, Zeile
Line Input #4, Zeile
Print #5, Zeile
Line Input #4, Zeile
Print #5, Zeile
Do While Not EOF(4)
Line Input #4, Zeile
Print #5, Replace(Zeile, „.“, „,“)
Loop
Close #4
Close #5
End Sub