R
Ryk
I have a project where I need to interact with a program and grab data.
I can make it grab it once, but have to reset it to do a second one,
and I think its because I don't know how to make a send key tab one
backwards.
I have a column of numbers in A, I tab to next screen, and the first
cell is where I need drop the data, then I tab once, and hit enter to
get my needed info. I am making no headway with this, but here is what
I have tried....
Sub GetData()
Dim Data As String
Data = ActiveCell.Value
' go down a row
ActiveCell.Offset(1, 0).Select
' flip back to previous window
SendKeys "%{tab}", True
' enter the Data
SendKeys Data, True
SendKeys "{tab}", True
' send it
SendKeys "{enter}", True
' need next line to tab back to last cell (not working)
SendKeys "{tab}", True
SendKeys "%{tab}", True
End Sub
For some reason it repeats the data it first grabbed over and over.
Thanks for any help.
Dave
I can make it grab it once, but have to reset it to do a second one,
and I think its because I don't know how to make a send key tab one
backwards.
I have a column of numbers in A, I tab to next screen, and the first
cell is where I need drop the data, then I tab once, and hit enter to
get my needed info. I am making no headway with this, but here is what
I have tried....
Sub GetData()
Dim Data As String
Data = ActiveCell.Value
' go down a row
ActiveCell.Offset(1, 0).Select
' flip back to previous window
SendKeys "%{tab}", True
' enter the Data
SendKeys Data, True
SendKeys "{tab}", True
' send it
SendKeys "{enter}", True
' need next line to tab back to last cell (not working)
SendKeys "{tab}", True
SendKeys "%{tab}", True
End Sub
For some reason it repeats the data it first grabbed over and over.
Thanks for any help.
Dave