我正在处理一个宏,该宏将打开Internet Explorer,在网站上登录,然后进行处理。宏在登录之前工作正常,并在“ MON”显示错误。还有其他一些问题:
我们也使用了额外的等待时间,例如“ 1分钟”,但是问题仍然存在。
Sub Intex()
Set ie = Createobject("internetexplorer.application")
ie.visible = ture
ie.navigate Range("URL").Value
Application.wait(now + timevalue("00:00:15"))
Set Login_Id = ie.document.getelementbyid("LoginID")
Login_id.value = ****
Set Login_pass = ie.document.getelementbyid("Password")
Login_pass.value = ****
ie.document.form(0). submit
Application.wait(now + timevalue("00:00:15"))
Set Mon= ie.document.getelementbyid("ddlReportingMonth")
For i= 0 to Mon.options.length
If Mon.Options(i).Text = Range("Rep_Mon").value
Mon.selectindex = i
Exit For
End If
Next i
预先感谢
答案 0 :(得分:0)
不用等待页面加载所需的时间
WITH j AS (
SELECT json_array_elements('[{"sym":"BTC","enn":"Bitcoin","fan":"","prc":7284.46,"c24":-4.33,"mkc":124460367747.02,"mkp":0},{"sym":"ETH","enn":"Ethereum","fan":"","prc":571.735,"c24":-5.23,"mkc":57166582578.235,"mkp":0},{"sym":"XRP","enn":"Ripple","fan":"","prc":0.625291,"c24":-6.28,"mkc":24539115471.842476,"mkp":0},{"sym":"BCH","enn":"Bitcoin Cash","fan":"","prc":1034.65,"c24":-7.09,"mkc":17771148400,"mkp":0},{"sym":"EOS","enn":"EOS","fan":"","prc":13.2186,"c24":-7.95,"mkc":11845841674.9512,"mkp":0}]'::json) AS sym
)
SELECT *
FROM j
WHERE j.sym->>'sym'= 'BTC';
sym
------------------------------------------------------------------------------------------------
{"sym":"BTC","enn":"Bitcoin","fan":"","prc":7284.46,"c24":-4.33,"mkc":124460367747.02,"mkp":0}
(1 Zeile)
尝试使用以下几行:
Application.wait(now + timevalue("00:00:15"))
在尝试设置Mon变量时应该可以解决您的错误