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!

does not write in text documnet 1

Status
Not open for further replies.

braven

Programmer
May 20, 2009
58
CA
could you check is there any modification in the below code
the macro is not writing in text documnet
this is what i have written.
is there any alternate way to do
checking the amount field. if it is more than 10 it is writing the whole particular row.
code is here
if trim(MyScreen.GetString(6,4,11)) = "SKIP REPORT" THEN
Print #1, "NO RECORDS FOUND" +Chr$(13) + Chr$(10)+"";
else
NotLastPage = true
NumberPage = NumberPage +1
NumberPage = 0

Do while (NotLastPage = true)

For i = 12 to 25
Amtcheck = trim(MyScreen.GetString(14,120,13))
if Amtcheck >= 10.00 then

Print #1, MyScreen.Area(6,71,6,83).value

Print #1, MyScreen.Area(i,02,i,132).value ' ( is not writing in text document

end if
Next i

pause 1
MyScreen.Sendkeys("<Pf8>")
MyScreen.WaitHostQuiet(g_HostSettleTime)

if MyScreen.Search("END OF REPORT").Value = "" then 'if we see request complete it'll skip this loop
NotLastPage = false
End if

Loop
if NumberPage <> 1 then

For i = 12 to 25
if Amtcheck >= 10.00 then
Print #1, MyScreen.Area(6,71,6,83).value
Print #1, MyScreen.Area(i,02,i,132).value
End if
Next i
End if

End if


 


Did you debug to check the value in Trim(MyScreen.GetString(i, 120, 13))?

Do some checking of your data BEFORE you post and then include pertinent data like this in your post.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top