shawwallace
Technical User
Hi!
thank you very much for your help.
the below code does it have any correction
from vt session
if it is more than two rows in excel that mean 14 and 15 press enter to next screen ( how do i write this codeas condition)
copy from excel 14c,14d,14e,14f,14g.14h to screen
Supplier Account 10,7, 5 ( 10th row, 7th column 5 total string)
Supplierunit 10,15,5
Supplier quantity 10,23,7
Supplierpartnumer 10,33,3
Product 10,39,4
Custg 10,67,5
from row 15c,15d,15e,15f,15g.15h
Supplier Account 16,7, 5
Supplierunit 16,15,5
Supplier quantity 16,23,7
Supplierpartnumer 16,33,3
PRODuct 16,39,4
custg 16,67,5
HERE IS THE CODE FULLY
dim r as range, lRowOut as long
Main
Dim appExcel As Object
Dim wbExcel As Object
Dim aSheet As Object
Dim Sessions as Object
Dim System as Object
Dim AccountNum As String
Dim Sess0 as Object
Set System = CreateObject("EXTRA.System")
Set Sessions = System.Sessions
Set Sess0 = System.ActiveSession
If (Sessions is Nothing) Then
Msgbox "Could not create the Sessions collection object. Stopping macro playback."
STOP
End If
Set AppExcel = CreateObject("Excel.Application")
If (System is Nothing) Then
Msgbox "Could not create the EXTRA System object. Stopping macro playback."
STOP
End If
Set wbExcel = AppExcel.WorkBooks.Open("C:\Program Files\ScriptTest.xls")
Set aSheet = wbExcel.Sheets("Activesheet")
i = 14 to 15
activesheet.Cells(i,c)= "SupplierAccount"
activesheet.cells(i,d)= "Supplierunit"
activesheet.Cells(i,e)= "supplierquantity"
activesheet.Cells(1,f)= "supplierpartnumber"
activesheet.Cells(1,g)= "partnumber"
activesheet.Cells(1,h)= "custg"
Trim(Sess.Screen.getString(10,7, 5)).value = activesheet.cells(i,c)
Trim(Sess.Screen.getString(10, 15,5)).value = activesheet.cells(i,d)
Trim(Sess.Screen.putString(10, 23,3)).value = activesheet.cells(i,e)
Trim(Sess.Screen.putString(10,33,3)).value = activesheet.cells(i,f)
Trim(Sess.Screen.putString(10,39,4)).value = activesheet.cells(i,g)
Trim(Sess.Screen.putString(10,67,5)).value = activesheet.cells(i,h)
Trim(Sess.Screen.getString(16,7, 5)).value = activesheet.cells(i,c)
Trim(Sess.Screen.getString(16, 15,5)).value = activesheet.cells(i,d)
Trim(Sess.Screen.putString(16, 23,3)).value = activesheet.cells(i,e)
Trim(Sess.Screen.putString(16,33,3)).value = activesheet.cells(i,f)
Trim(Sess.Screen.putString(16,39,4)).value = activesheet.cells(i,g)
Trim(Sess.Screen.putString(160,67,5)).value = activesheet.cells(i,h)
thank you very much for your help.
the below code does it have any correction
from vt session
if it is more than two rows in excel that mean 14 and 15 press enter to next screen ( how do i write this codeas condition)
copy from excel 14c,14d,14e,14f,14g.14h to screen
Supplier Account 10,7, 5 ( 10th row, 7th column 5 total string)
Supplierunit 10,15,5
Supplier quantity 10,23,7
Supplierpartnumer 10,33,3
Product 10,39,4
Custg 10,67,5
from row 15c,15d,15e,15f,15g.15h
Supplier Account 16,7, 5
Supplierunit 16,15,5
Supplier quantity 16,23,7
Supplierpartnumer 16,33,3
PRODuct 16,39,4
custg 16,67,5
HERE IS THE CODE FULLY
dim r as range, lRowOut as long
Main
Dim appExcel As Object
Dim wbExcel As Object
Dim aSheet As Object
Dim Sessions as Object
Dim System as Object
Dim AccountNum As String
Dim Sess0 as Object
Set System = CreateObject("EXTRA.System")
Set Sessions = System.Sessions
Set Sess0 = System.ActiveSession
If (Sessions is Nothing) Then
Msgbox "Could not create the Sessions collection object. Stopping macro playback."
STOP
End If
Set AppExcel = CreateObject("Excel.Application")
If (System is Nothing) Then
Msgbox "Could not create the EXTRA System object. Stopping macro playback."
STOP
End If
Set wbExcel = AppExcel.WorkBooks.Open("C:\Program Files\ScriptTest.xls")
Set aSheet = wbExcel.Sheets("Activesheet")
i = 14 to 15
activesheet.Cells(i,c)= "SupplierAccount"
activesheet.cells(i,d)= "Supplierunit"
activesheet.Cells(i,e)= "supplierquantity"
activesheet.Cells(1,f)= "supplierpartnumber"
activesheet.Cells(1,g)= "partnumber"
activesheet.Cells(1,h)= "custg"
Trim(Sess.Screen.getString(10,7, 5)).value = activesheet.cells(i,c)
Trim(Sess.Screen.getString(10, 15,5)).value = activesheet.cells(i,d)
Trim(Sess.Screen.putString(10, 23,3)).value = activesheet.cells(i,e)
Trim(Sess.Screen.putString(10,33,3)).value = activesheet.cells(i,f)
Trim(Sess.Screen.putString(10,39,4)).value = activesheet.cells(i,g)
Trim(Sess.Screen.putString(10,67,5)).value = activesheet.cells(i,h)
Trim(Sess.Screen.getString(16,7, 5)).value = activesheet.cells(i,c)
Trim(Sess.Screen.getString(16, 15,5)).value = activesheet.cells(i,d)
Trim(Sess.Screen.putString(16, 23,3)).value = activesheet.cells(i,e)
Trim(Sess.Screen.putString(16,33,3)).value = activesheet.cells(i,f)
Trim(Sess.Screen.putString(16,39,4)).value = activesheet.cells(i,g)
Trim(Sess.Screen.putString(160,67,5)).value = activesheet.cells(i,h)