×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

from excel to Extra! - coding corrections!

from excel to Extra! - coding corrections!

from excel to Extra! - coding corrections!

(OP)
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)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close