sundar766
Technical User
- Feb 6, 2008
- 9
HI!
I have the below code from screen to excel from vt session copy
but i need it the requirment below:
i have screen K1,K2,K3,K4,K5,K6,K7,K8,K9,KA,KB,KC,KD,KE
FROM EACH SCREEN IT WILL GO USING SHIFT + KEY ENTER K2, K3
AND SO ON AND CHECK THE BELOW ON sess.Screen.SENDKEYS("<Home>GD<Tab>*<EraseEOF><Tab>NKMUT<Enter>")
WRTIE INTO EXCEL .
MY QUESTION IS HOW DO I PUT THE ABOVE ONE IN ARRAY? COULD YOU PROVIDE HOW CAN I DO THIS ONE
SO THAT I WILL CHECK EACH SCREEN THE BELOW ONE CHECK AND WRITE INTO EXCEL.
COULD YOU PROVIDE THE CODE IN THE ABOVE THING
THNKS A LOT FOR YOUR HELP.
Declare Sub Wait(Sess As Object)
Sub Main()
Dim Sys As Object, Sess As Object
Set Sys = CreateObject("Extra.System")
If Sys Is Nothing Then
MsgBox ("Could not create Extra.System...is E!PC installed on this machine?")
Exit Sub
End If
Set Sess = Sys.ActiveSession
If Sess Is Nothing Then
MsgBox ("No session available...stopping macro playback.")
Exit Sub
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sess.Screen.SENDKEYS("<Home>GD<Tab>*<EraseEOF><Tab>NKMUT<Enter>")
Dim xl As Object, xl_wb As Object, xl_sheet_1 As Object, file_name As String
Dim vEHNO As String, vEHNAME As String
Dim Effdate As String, PARTNUMBER As String, PARTNAME As String
Dim Stat As String, Errors As String, LastUpdate As String
Dim i As Integer, j As Long
Dim dict As Object
Dim sFile as String
file_name = "C:\Documents and Settings\Desktop\VEH.xls"
sFile = "C:\Documents and Settings\Desktop\VEH.XLS"
Set xl = CreateObject("Excel.Application")
' Set xl_wb = xl.Workbooks.Open(file_name)
Set xl_wb = xl.Workbooks.Add
xl_wb.SaveAs(sFile)
Set xl_sheet_1 = xl_wb.Sheets("Sheet1")
xl.Visible = True
xl.DisplayAlerts = False
xl_sheet_1.Range("A:A").EntireRow.Font.Size = 11
xl_sheet_1.Columns("A").ColumnWidth = 5
xl_sheet_1.Columns("B").ColumnWidth = 12
xl_sheet_1.Columns("C").ColumnWidth = 10
xl_sheet_1.Columns("D").ColumnWidth = 5
xl_sheet_1.Columns("E").ColumnWidth = 4
I have the below code from screen to excel from vt session copy
but i need it the requirment below:
i have screen K1,K2,K3,K4,K5,K6,K7,K8,K9,KA,KB,KC,KD,KE
FROM EACH SCREEN IT WILL GO USING SHIFT + KEY ENTER K2, K3
AND SO ON AND CHECK THE BELOW ON sess.Screen.SENDKEYS("<Home>GD<Tab>*<EraseEOF><Tab>NKMUT<Enter>")
WRTIE INTO EXCEL .
MY QUESTION IS HOW DO I PUT THE ABOVE ONE IN ARRAY? COULD YOU PROVIDE HOW CAN I DO THIS ONE
SO THAT I WILL CHECK EACH SCREEN THE BELOW ONE CHECK AND WRITE INTO EXCEL.
COULD YOU PROVIDE THE CODE IN THE ABOVE THING
THNKS A LOT FOR YOUR HELP.
Declare Sub Wait(Sess As Object)
Sub Main()
Dim Sys As Object, Sess As Object
Set Sys = CreateObject("Extra.System")
If Sys Is Nothing Then
MsgBox ("Could not create Extra.System...is E!PC installed on this machine?")
Exit Sub
End If
Set Sess = Sys.ActiveSession
If Sess Is Nothing Then
MsgBox ("No session available...stopping macro playback.")
Exit Sub
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sess.Screen.SENDKEYS("<Home>GD<Tab>*<EraseEOF><Tab>NKMUT<Enter>")
Dim xl As Object, xl_wb As Object, xl_sheet_1 As Object, file_name As String
Dim vEHNO As String, vEHNAME As String
Dim Effdate As String, PARTNUMBER As String, PARTNAME As String
Dim Stat As String, Errors As String, LastUpdate As String
Dim i As Integer, j As Long
Dim dict As Object
Dim sFile as String
file_name = "C:\Documents and Settings\Desktop\VEH.xls"
sFile = "C:\Documents and Settings\Desktop\VEH.XLS"
Set xl = CreateObject("Excel.Application")
' Set xl_wb = xl.Workbooks.Open(file_name)
Set xl_wb = xl.Workbooks.Add
xl_wb.SaveAs(sFile)
Set xl_sheet_1 = xl_wb.Sheets("Sheet1")
xl.Visible = True
xl.DisplayAlerts = False
xl_sheet_1.Range("A:A").EntireRow.Font.Size = 11
xl_sheet_1.Columns("A").ColumnWidth = 5
xl_sheet_1.Columns("B").ColumnWidth = 12
xl_sheet_1.Columns("C").ColumnWidth = 10
xl_sheet_1.Columns("D").ColumnWidth = 5
xl_sheet_1.Columns("E").ColumnWidth = 4