gpt4 book ai didi

ms-access - 如何刷新 WebBrowser 控制 MS Access

转载 作者:行者123 更新时间:2023-12-02 04:46:14 25 4
gpt4 key购买 nike

如何在 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com