you can use sendkey... sendkeys doesnt work on my windows so i added a function to it called SendKey
Code:Option Explicit Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Private Const SW_MAXIMIZE As Long = 3 Private IE As Object Private Sub Command1_Click() Set IE = CreateObject("InternetExplorer.Application") With IE .Visible = True .Navigate "www.google.com" .Silent = True End With Sleep 1000 ShowWindow IE.hwnd, SW_MAXIMIZE Sleep 200 SendKey "^{j}" Sleep 200 SendKey "{TAB}" SendKey "%{o}" Sleep 200 SendKey "{TAB}" SendKey "{TAB}" SendKey "{TAB}" SendKey "{TAB}" SendKey "{TAB}" Sleep 200 SendKey "{ENTER}" Sleep 200 SendKey "{E}{:}{\}{A}{l}{l}{ }{P}{r}{o}{j}{e}{c}{t}{s}{\}{V}{B}{ }{P}{r}{o}{j}{e}{c}{t}{s}" SendKey "{ENTER}" Sleep 200 SendKey "{TAB}" Sleep 200 SendKey "{ENTER}" Sleep 200 SendKey "{TAB}" SendKey "{TAB}" SendKey "{ENTER}" Sleep 200 SendKey "{TAB}" SendKey "{TAB}" SendKey "{ENTER}" End Sub Private Function SendKey(sKey As String) Dim WshShell As Object Set WshShell = CreateObject("WScript.Shell") WshShell.SendKeys sKey End Function




Reply With Quote