Hello im trying to populate an IE page with an excel macro, by copying a cell value, alt tabbing to the IE page, pasting the value in the IE, then alt tabbing back to the excel, and moving down one and repeating this function over again. so far i have this code that doesnt work on the IE page.
Which was given to me by rhodie72. within this code the RESET function is whats causing issue and i dont know why.
and my own code that just does the functions of copying, alt tabbing, pasting, alt tabbing, moving down and looping.
Code:
Sub alttabtest()
Dim x As Long, AltKey As String, TabKey As String
AltKey = "%"
TabKey = "{TAB}"
For x = 1 To 16
' copy active cell's value
With ActiveCell
.Copy
GoSub ThisTime
SendKeys AltKey & TabKey
GoSub ThisTime
SendKeys "^v", True
GoSub ThisTime
SendKeys AltKey & TabKey
.Offset(0, 1).Select
End With
Next x
Exit Sub
ThisTime:
Application.Wait (Now + TimeValue("00:00:01"))
Reset
End Sub
and my own code that just does the functions of copying, alt tabbing, pasting, alt tabbing, moving down and looping.
Code:
Sub macrotest()
Dim x As Long
' macrotest Macro
' macrotest
'
' Keyboard Shortcut: Ctrl+q
For x = 1 To 16
Selection.Copy
Application.Wait (Now + TimeValue("00:00:01"))
SendKeys "%{TAB}", True
Application.Wait (Now + TimeValue("00:00:01"))
SendKeys "^v", True
Application.Wait (Now + TimeValue("00:00:01"))
SendKeys "%{TAB}", True
ActiveCell.Offset(0, 1).Range("A1").Select
Next x
'
End Sub