Sub macro_22333()
Dim excelApp As Object
Dim z As Integer
Set excelApp = GetObject(, "Excel.Application")
Set excelApp = GetObject("C:\Documents and Settings\mintezar\Desktop\Book1.xlsx")
z = excelApp.ActiveSheet.Range("B2").Copy
With Session
.WaitForEvent rcEnterPos, "30", "0", 1, 1
.TransmitTerminalKey rcIBMPf9Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 5, 13
.WaitForDisplayString "==>", "30", 5, 9
.TransmitANSI "1"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 18, 33
.WaitForDisplayString "ID:", "30", 18, 29
.TransmitANSI "akhimki"
.TransmitTerminalKey rcIBMTabKey
' Provide Password for Security
Dim hostpassword As String
hostpassword = ""
hostpassword = .GetPassword("PASSWORD:", "", "", "")
.TransmitANSI hostpassword
.TransmitANSI "50.7.13"
.TransmitTerminalKey rcIBMEnterKey
End With
With Session
.WaitForEvent rcEnterPos, "30", "0", 4, 16
.WaitForDisplayString "CITY/SITE:", "30", 4, 4
.TransmitTerminalKey rcIBMTabKey
.TransmitTerminalKey rcIBMTabKey
.Paste
TransmitTerminalKey rcIBMTabKey
.WaitForEvent rcEnterPos, "30", "0", 23, 15
.WaitForDisplayString "SCREEN:", "30", 23, 7
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 1, 80
.WaitForDisplayString "UPDATE(Y/N):", "30", 1, 67
.MoveCursor 4, 11
End With
z = excelApp.ActiveSheet.Range("C2").Copy
With Session
.WaitForEvent rcEnterPos, "30", "0", 4, 11
.WaitForDisplayString "SEALS..:", "30", 4, 2
.Paste
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
z = excelApp.ActiveSheet.Range("b3").Copy
With Session
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 3, 11
.WaitForDisplayString "NBR:", "30", 3, 6
.Paste
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcEnterPos, "30", "0", 1, 80
.WaitForDisplayString "UPDATE(Y/N):", "30", 1, 67
.MoveCursor 4, 11
.WaitForDisplayString "SEALS..:", "30", 4, 2
z = excelApp.ActiveSheet.Range("C3").Copy
.Paste
.TransmitTerminalKey rcIBMEnterKey
z = excelApp.ActiveSheet.Range("B4").Copy
.Paste
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcEnterPos, "30", "0", 1, 80
.WaitForDisplayString "UPDATE(Y/N):", "30", 1, 67
.MoveCursor 4, 11
.WaitForDisplayString "SEALS..:", "30", 4, 2
End With
End With
End Sub