個人積分:6分
文章編號:49175729
個人積分:6分
文章編號:49175852
但是開啟瀏覽器後,點選自動執行,就出現錯誤了!
以下是小弟拿你的程式,自己改成chrome執行看看,因為小弟的電腦使用IE跑起來好慢
不知是否改成chrome來執行,還需要改別的地方? 紅色的部分是小弟把路徑換成chrome,綠色就是錯誤的地方!
Private Sub CommandButton1_Click()
'載入登陸網頁
Set wss = CreateObject("WScript.Shell")
Set sh = CreateObject("Shell.Application")
wss.exec "%ProgramFiles%/Google/Chrome/Application/chrome.exe -nomerge " + Cells(11, 2)
delay (1)
End Sub
Private Sub CommandButton2_Click()
'找尋網頁
For Each oWin In sh.Windows
If TypeName(oWin.document) = "HTMLDocument" And oWin.LocationUrl = Cells(11, 3) Then
Set IE = oWin
Exit For
Else
a = 1
End If
Next
'登陸
IE.document.all("username").Value = Cells(1, 2)
IE.document.all("userPwd").Value = Cells(2, 2)
IE.document.all("loginForm").Click
為提供您更優質的服務,本網站使用cookies。若您繼續瀏覽網頁,即表示您同意我們的cookies政策。 了解隱私權條款





























































































