如何在 MS Access 2010 上刷新网页浏览器控件?
我正在尝试这个:
Private Sub Btn_Report_Click()
'Create the report HTML...
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile("C:\Windows\Temp\test_report.html")
message= "Test of line on variable"
objFile.WriteLine (message)
objFile.WriteLine ("This is the second line")
objFile.Close
End Sub
webcontrol 在 Control Source 属性上有这个
="C:\Windows\Temp\test_report.html"
谢谢,
最佳答案
当 webBrowser 控件的 ControlSource 属性更改/更新时,它会自动刷新窗体上的 webBrowser 控件。
话虽如此,您可以使用以下技巧(在 url 末尾生成随机数)
Form_frm_Codes.WebBrowser.ControlSource = "=""D:\abcd.html?rnd=" & Int((300 - 200 + 1) * Rnd + 200) & """"
关于ms-access - 如何刷新 WebBrowser 控制 MS Access,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19749233/