Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with copying from excel to extra? 1

Status
Not open for further replies.

bigdubbe

Programmer
May 26, 2006
11
US
I was wondering if anyone can point me in the right direction.

I want to take the number in row 1 column 2 in excel and copy that number and paste it into extra and repeat this going down the row until the value of the cell equal 0.

I can get the right excel document open and have the right worksheet active. I just want to know what I have to do to copy the number and loop it until the cell equal zero.

Any help is appericated.
 
i do something like this in vba

Code:
Sub Row()
Dim Sessions As Object
Dim System As Object
Dim Sess0 As Object
Set System = CreateObject("EXTRA.System")
Set Sessions = System.Sessions
Set Sess0 = System.ActiveSession

For i = 1 To ActiveSheet.Rows.Count
If Range("B" & i).FormulaR1C1 = "0" Then
MsgBox "done"
Exit Sub
End If
DataInput = Range("B" & i)
Sess0.Screen.PutString DataInput, 2, 11
Next
End Sub

While in Extra, it's something like this:
Code:
For i = 1 To 65536
If objWorkBook.Range("B" & i).FormulaR1C1 = "0" Then
MsgBox "done"
Exit Sub
End If
DataInput = objWorkBook.Range("B" & i)
Sess0.Screen.PutString DataInput, 2, 11
Next

Don't know if this is what you are looking for, but hope it helps

zach
 



Hi,

I'd run it from Excel VB with just a cupla tweeks...
Code:
Sub Row()
Dim Sessions As Object
Dim System As Object
Dim Sess0 As Object
dim r as range

Set System = CreateObject("EXTRA.System")
Set Sessions = System.Sessions
Set Sess0 = System.ActiveSession

for each r in range([b1], [b1].end(xldown))
  if r.value = 0 then exit for
  Sess0.Screen.PutString r.value, 2, 11
next
End Sub


Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Thanks for the help never thought about running excel to extra. It is much easier. Thank You
 



In the VB Editor you might need to set a reference to Attachmate Extra n.m Object Library.

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 



That's why I'm here, because I often learn something new at Tek-Tips.

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top