-
Code Indent
[VBA]Sub Extra()
Dim dest As Range 'Set starting row variable
Set dest = Range("B5")
Do
'Get Data
dest.Cells(1, 1) = Sess0.Screen.GETstring(9, 14, 8) 'DATA FROM EXTRA
dest.Cells(1, 2) = Sess0.Screen.GETstring(10, 14, 2) 'DATA FROM EXTRA
dest.Cells(1, 3) = Sess0.Screen.GETstring(11, 14, 5) 'DATA FROM EXTRA
' Deal with next record
Set dest = dest.Offset(1, 0) ' Move dest down one row
Sess0.Screen.SendKeys ("<PF6>") 'NEXT FILE IN EXTRA
Sess0.Screen.WaitHostQuiet (1000)
Loop While Sess0.Screen.GETstring(24, 2, 7) <> "TTS706I"
End Sub
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules