PDA

View Full Version : Solved: A quick Sendkey question



igotgame
03-22-2009, 10:01 PM
How can I Sendkey a particular CELL from an excel spreadsheet into a text box on and IE form?

I know sendkeys aren't reliable and this form is gigantic and it's all be filled out with getelementbyTagName statements....works perfect...but this one text box is inside of a javascript function that can't be called properly.

I need to Sendkey a cell from my worksheet into the text box on the IE form.

Something like:

SendKeys ActiveSheet.Cells(11, H)

or

Sendkeys Workbooks("WP.xls").Worksheets("Data").Range("B4")

or can you SendKey a variable somehow?

Does anyone know how to do this?

I think it's tougher because I want it to send those keys into an IE form and not an excel spreadsheet.

Jan Karel Pieterse
03-22-2009, 10:46 PM
Your job is to ensure the form element has the focus and that IE is the active window. Then you can use SENDKEYS:

Sendkeys Workbooks("WP.xls").Worksheets("Data").Range("B4").Value