AnsweredAssumed Answered

Display web page in ProcessBook

Question asked by engineertdog on May 13, 2020

I'm trying to display websites in a ProcessBook display where we're rotating through displays on a slideshow for our lobby. I have the website loading properly, however, I need to have the website refresh every so often. The code I have below works, but it generates memory errors. I'm not great with VBA, nor am I found of IE, so I'm not sure why it would throw an error for simply refreshing the page that already exists. I found some issues online related to browser memory, but they were all using .Net with code that I couldn't translate over to VBA.

 

I've replaced the (long) URL with Google just for simplicity.

 

Private Const url As String = "https://www.google.com"
Private Const updateInterval As Integer = 60
Private updateTime As Date

Sub LoadAll()   
   Me.WebBrowser1.Navigate (url)   
   updateTime = Now
End Sub

Sub Display_DataUpdate()   
   If DateDiff("s", updateTime, Now) >= updateInterval Then       
      Me.WebBrowser1.Refresh       
      updateTime = Now   
   End If
End Sub

Outcomes