ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SetCursorPos (https://www.excelbanter.com/excel-programming/343485-setcursorpos.html)

DejaVu[_53_]

SetCursorPos
 

I'm trying to get some code that will control the cursor position on my
AS400. I need to set the cursor to position *15, 9*, then send the
command *F2*.
Here is my code:
PS1.SetCursorPos 15, 9
OIA1.WaitForAppAvailable
OIA1.WaitForInputReady
PS1.SendKeys "[pf2]", 15, 9
OIA1.WaitForAppAvailable
OIA1.WaitForInputReady

This does not work, however, because it will not set the cursor
position unless I somehow activate the AS400 window, then set the
cursor position, then send F2. I'm not sure how to do this with code,
or if there is any other way around it.

Anyone know how to solve my little problem?

TIA,

DejaVu


--
DejaVu
------------------------------------------------------------------------
DejaVu's Profile: http://www.excelforum.com/member.php...o&userid=22629
View this thread: http://www.excelforum.com/showthread...hreadid=478285


bigwheel[_5_]

SetCursorPos
 

So, what version of Excel are you using?


--
bigwheel
------------------------------------------------------------------------
bigwheel's Profile: http://www.excelforum.com/member.php...o&userid=25301
View this thread: http://www.excelforum.com/showthread...hreadid=478285


DejaVu[_54_]

SetCursorPos
 

Microsoft Excel 2003


--
DejaVu
------------------------------------------------------------------------
DejaVu's Profile: http://www.excelforum.com/member.php...o&userid=22629
View this thread: http://www.excelforum.com/showthread...hreadid=478285



All times are GMT +1. The time now is 04:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com