Hallo zusammen,

ich poste mal gerne ein Test Skript vorab:

OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)

REM This line calls the macro subroutine
subSub1_

sub subSub1_()
autECLSession.autECLOIA.WaitForAppAvailable

autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "3860884221"

autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"

autECLSession.autECLPS.WaitForAttrib 12,1,"10","3c",3,10000

autECLSession.autECLPS.Wait 3120

autECLSession.autECLOIA.WaitForAppAvailable

autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf12]"

autECLSession.autECLPS.WaitForAttrib 4,32,"10","3c",3,10000

autECLSession.autECLPS.Wait 1201

autECLSession.autECLOIA.WaitForAppAvailable

autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf12]"

autECLSession.autECLPS.WaitForAttrib 21,6,"00","3c",3,10000

autECLSession.autECLPS.WaitForCursor 21,7,10000

autECLSession.autECLOIA.WaitForAppAvailable

autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "1"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
end sub

Die Fett gedruckte Passage soll durch eine Variable oder wie auch immer eine neue Kundennummer aus einer Excel Tabelle nehmen.
Mein Ziel ist es ein und den selben Befehl auf bestimmte Kd.Nr. auszuführen die aus einer Abfrage aus der AS400 in Excel resultieren.
Wie muss das Makro geschrieben sein, dass er sich die Kd.Nr. aus Excel rauszieht?
Danke für eine kurze Antwort.
sweety2401