read cointuous rows write into screen
read cointuous rows write into screen
(OP)
I am trying to do read from excel sheet2 column b and row 8 wrtie to the screen position in 45,52
How do identity that is in row 8 and till end
Putstring in screen do something and go back again read next row and putstring in screen till endth row
I could not figure it out. Could you please help me
How do identity that is in row 8 and till end
Putstring in screen do something and go back again read next row and putstring in screen till endth row
I could not figure it out. Could you please help me
RE: read cointuous rows write into screen
Sometimes you gotta leave your zone of safety. You have to manufacture Inspirado. You gotta get out of the apartment. You've got to run with the wolves. You've got to dive into the ocean and fight with the sharks. Or just treat yourself to a delicious hot fudge sundae........ with nuts. - Jack Black
RE: read cointuous rows write into screen
h
RE: read cointuous rows write into screen
thanks for your comment. i did some point
here is part of the code
could yuo help me
last_row2 = xl_sheet_2.Range("B2").CurrentRegion.Rows.Count
next_row = xl_sheet_2.Range("B2").CurrentRegion.Rows.Count + 1
For k = 2 To last_row2
x = Trim(xl_sheet_2.range("Bk") ' syntax error
MyScreen.PutString x,8,13
Next
RE: read cointuous rows write into screen
in order for us to help you, you need to provide more details...
IknowMe said:
...
are you writing this in excel or attachmate?
in your latest post
CODE
did you at least try the code i posted?
RE: read cointuous rows write into screen
thanks this is my code here:
after this
MyScreen.PutString ("SM"),6,48
after press enter
after that sercH 'MARKED"- YES"
write into column f and go back to next row in column b and
repeat do---- loop
i am struggling here becasue the marked is not in first page
it come in 4th page or some where in middle i could not write in column f
could you help me in this regards
thanks guys really great!
the below code shows: here
j = 2
Last_row2 = xl_sheet_2.Range("B1").CurrentRegion.Rows.Count
msgbox(last_row2)
' next_row = xl_sheet_2.Range("B1").CurrentRegion.Rows.Count + 1
'msgbox(next_row)
For k = 2 To last_row2
do
x = Trim(xl_sheet_2.Cells(k, "B").Value)
MyScreen.PutString x, 5,27
MyScreen.SENDKEYS("<Enter>")
iwait
MyScreen.PutString ("SM"),6,48
MyScreen.SENDKEYS("<Enter>")
IF MyScreen.find ("MARKED:") then
DONT KNOW WHAT I HAVE WRITTEN HERE
end if
Loop Until xl_sheet_2.Cells(k, "B").Value <> ""
Next
end with
RE: read cointuous rows write into screen
try this code out
CODE
Dim Sys As Object, Sess As Object, MyScreen As Object, MyArea As Object
Set Sys = CreateObject("EXTRA.System")
Set Sess = Sys.ActiveSession
Dim obj as object
Dim objWorkbook as object
Set obj=CreateObject("Excel.Application")
Set obj = Getobject("C:\test.xls") 'i used this to test the code
set objWorkbook=obj.Worksheets("bud") 'with this worksheet
For i = 2 To obj.ActiveSheet.Rows.Count
xlData = trim(objWorkBook.Range("B" & i))
if xlData = "" Then exit For
Set MyScreen = Sess.Screen
MyScreen.PutString xlData,5,27 'this places the data from Excel
MyScreen.SendKeys ("<Enter>")
'consider pausing here to give a chance for system response
MyScreen.WaitHostQuiet (100)
MyScreen.PutString "SM", 6,48 'your code had ("SM"), this is wrong
MyScreen.SendKeys ("<Enter>")
'consider pausing here to give a chance for system response
MyScreen.WaitHostQuiet (100)
'the following code below
'moves the cursor to row 1 column one
'and then searches for the word MARKED
'if the word is found, the cursor is moved to
'where the word MARKED was found
'a comparison is made where the cursor is found
'if the cursor is still on row
'if it's not found, then go to next page
'and continue until the word is found
Do
MyScreen.MoveTo 1, 1
Set MyArea = MyScreen.Search("MARKED")
MyScreen.MoveTo MyArea.Bottom, MyArea.Left
MyRw = MyScreen.Row
If MyRw = 1 Then
MyScreen.SendKeys ("<Enter>") 'dunno how you go to next page
'change accordingly
Else
'this means MARKED was found because the cursor was moved
'from 1,1
'the following will place the word "YES"
'in column F same row as B
objWorkBook.Range("F" & i) = "YES"
exit do 'this will now loop to next entry in Excel Sheet Col B
end if
Loop
'CAUTION:
'need to exit Loop if MARKED is not found
'how many pages are there? or will MARKED always be found?
'if there are only 6 pages, then add a counter for each loop
next i
End Sub
hth
RE: read cointuous rows write into screen
thanks a lot, i will try it on monday and let you know
but there is no page limit may be 2nd page or may 4 or 6.
so can i do untill if Myscreen, search (""marked: ") then
What is this code for if it is not found in first page market instead of enter f8 go to next page
MyScreen.MoveTo MyArea.Bottom, MyArea.Left
MyRw = MyScreen.Row
If MyRw = 1 Then 'why this is 1,
thanks a lot, learnt from you, great!!. thanks a lot .
one more is it possible can i generate standard email .
i am writing macro in Extra!.
standard email with different user
RE: read cointuous rows write into screen
if you look carefully at the code, i added this right after Do
CODE
then it proceeds to "search" for your qualifier "marked". if it finds this qualifier, move the cursor to the where the word marked begins
CODE
CODE
you need to step through the code and figure out on your own what the code is doing or not doing. this is the *best* way to learn.
and sorry, i don't know how to handle email. maybe someone else can help you with that in your other post
RE: read cointuous rows write into screen
RE: read cointuous rows write into screen
RE: read cointuous rows write into screen
You really ought to...
Thank vzachin
for this valuable post!.
The little purple Stars accomplish several important things.
First, it gives positive feedback to contributors, that their posts have been helpful.
Second, it identifies threads as containing helpful posts, so that other members can benefit.
And third, it identifies the original poster (that's YOU, BTW), as a grateful member, that not only receives, but is willing to give tokens of thanks.
Skip,
Just traded in my old subtlety...
for a NUANCE!