not picking up last page
not picking up last page
(OP)
i have 6 pages. each page has 6 to 23 rows
picking correctly. but last page not picking up before picking it come out from the loop.
could you help me what is wrong in the below code.
Do
For i = 6 To 23
a = Trim(Sess.Screen.GetString(i, 11, 6))
b = Trim(Sess.Screen.GetString(i, 22, 10))
c = Trim(Sess.Screen.GetString(i, 35, 20))
d = Trim(Sess.Screen.GetString(i, 59, 10))
if Logonid <> "MVPRB" then
j = j + 1
xl_sheet_1.Cells(j, "A").Value = a
xl_sheet_1.Cells(j, "B").Value = b
xl_sheet_1.Cells(j, "C").Value = c
xl_sheet_1.Cells(j, "D").Value = d
Else
End If
Next
Sess.Screen.SendKeys ("<PF8>")
Call Wait(Sess)
Loop Until Ucase(Sess.Screen.GetString(24, 8, 11)) = "END OF LIST"
picking correctly. but last page not picking up before picking it come out from the loop.
could you help me what is wrong in the below code.
Do
For i = 6 To 23
a = Trim(Sess.Screen.GetString(i, 11, 6))
b = Trim(Sess.Screen.GetString(i, 22, 10))
c = Trim(Sess.Screen.GetString(i, 35, 20))
d = Trim(Sess.Screen.GetString(i, 59, 10))
if Logonid <> "MVPRB" then
j = j + 1
xl_sheet_1.Cells(j, "A").Value = a
xl_sheet_1.Cells(j, "B").Value = b
xl_sheet_1.Cells(j, "C").Value = c
xl_sheet_1.Cells(j, "D").Value = d
Else
End If
Next
Sess.Screen.SendKeys ("<PF8>")
Call Wait(Sess)
Loop Until Ucase(Sess.Screen.GetString(24, 8, 11)) = "END OF LIST"
RE: not picking up last page
CODE
For i = 6 To 23
a = Trim(Sess.Screen.GetString(i, 11, 6))
b = Trim(Sess.Screen.GetString(i, 22, 10))
c = Trim(Sess.Screen.GetString(i, 35, 20))
d = Trim(Sess.Screen.GetString(i, 59, 10))
if Logonid <> "MVPRB" then
j = j + 1
xl_sheet_1.Cells(j, "A").Value = a
xl_sheet_1.Cells(j, "B").Value = b
xl_sheet_1.Cells(j, "C").Value = c
xl_sheet_1.Cells(j, "D").Value = d
Else
End If
Next
if Ucase(Sess.Screen.GetString(24, 8, 11)) = "END OF LIST" then
exit sub
else
Sess.Screen.SendKeys ("<PF8>")
end if
Call Wait(Sess)
Loop
RE: not picking up last page
RE: not picking up last page
RE: not picking up last page
how do i do that?
in if statment instead of exit sub how do i insert call funciton here
if Ucase(Sess.Screen.GetString(24, 8, 11)) = "END OF LIST" then
exit sub
else
Sess.Screen.SendKeys ("<PF8>")
end if
Call Wait(Sess)
Loop
RE: not picking up last page
Just create another procedure and call it BEFORE the Exit Sub
Skip,
Don't let the Diatribe...![[tongue] tongue](https://www.tipmaster.com/images/tongue.gif)
Just traded in my old subtlety...
talk you to death!
for a NUANCE!
RE: not picking up last page
RE: not picking up last page
RE: not picking up last page
exit do will do the same page repeat. it wont end
RE: not picking up last page
exit do should exit the Do/Loop ; then you would add additional coding after the Loop
Skip's coding will work as well
glad you can work it out
zach
RE: not picking up last page