ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SendKeys with enter (https://www.excelbanter.com/excel-programming/442482-sendkeys-enter.html)

thread

SendKeys with enter
 
hi all
i'm trying to use SendKeys to simulate rutine action.
i'm doing the actions on web based system but from some reason after
using the enter in the sendkeys the rest of the actions are not
working
this is the code
Dim i, J As Long
Range("A1").Select
While Selection.Font.ColorIndex = 4
Selection.Offset(1, 0).Select
Wend
Selection.Font.ColorIndex = 4
i = Selection.Cells
SendKeys "%{TAB}", True
SendKeys "{DEL}", True
SendKeys i, True
SendKeys "{ENTER}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True

thank you for any advice

Gary''s Student

SendKeys with enter
 
Try inserting a DoEvents command immediately after the

SendKeys "{ENTER}", True
--
Gary''s Student - gsnu201002


"thread" wrote:

hi all
i'm trying to use SendKeys to simulate rutine action.
i'm doing the actions on web based system but from some reason after
using the enter in the sendkeys the rest of the actions are not
working
this is the code
Dim i, J As Long
Range("A1").Select
While Selection.Font.ColorIndex = 4
Selection.Offset(1, 0).Select
Wend
Selection.Font.ColorIndex = 4
i = Selection.Cells
SendKeys "%{TAB}", True
SendKeys "{DEL}", True
SendKeys i, True
SendKeys "{ENTER}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True

thank you for any advice
.



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

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