xcruc1at3r
Member
I here any possibility that can we Make it Excel dynamic range cause the excel varies its range? if the code would be really big so it would take load of time and memory as well
Sub macro_22333()
Dim excelApp As Object
Dim z As Integer
Set excelApp = GetObject(, "Excel.Application")
Set excelApp = GetObject("C:Documents and SettingsmintezarDesktopBook1.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
' Password has not been recorded 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
.TransmitTerminalKey rcIBMNewLineKey
.TransmitTerminalKey rcIBMNewLineKey
.TransmitTerminalKey rcIBMNewLineKey
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
Sub macro_22333()
Dim excelApp As Object
Dim z As Integer
Set excelApp = GetObject(, "Excel.Application")
Set excelApp = GetObject("C:Documents and SettingsmintezarDesktopBook1.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
' Password has not been recorded 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
.TransmitTerminalKey rcIBMNewLineKey
.TransmitTerminalKey rcIBMNewLineKey
.TransmitTerminalKey rcIBMNewLineKey
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