VBA code to cycle through web pages -
i have been looking solution cycle through web pages created excel in html, 'slideshow' of created html pages stored on local server. goal cycle through endlessly, display them on large monitor, , allow pages picked updated once per week. there typically 4 - 6 html sides available cycle through.
found starter code, , having issues run-time error 91, object variable or block variable not set
when using webpages server verses web. code work if using actual webpages www , allow same webpage updated rather opening new 1 each time.
maybe has done similar different approach? can this!
here code far:
sub cylewebpages() dim ie object dim x integer ' set ie = createobject("internetexplorer.application") ie.visible = true ie.navigate "\\server\slide1.htm" waitfor ie set ie = getie("\\server\slide1.htm") while x < 99999 ' ideally endless = 2 4 ie.navigate "\\server\slide" & & ".htm" next x = x + 1 loop ' end sub sub waitfor(ie) ' application.wait + timevalue("00:00:02") ' loop until ie.readystate = readystate_complete end sub function getie(slocation string) object dim objshell object, objshellwindows object, o object dim surl string dim retval object ' set retval = nothing set objshell = createobject("shell.application") set objshellwindows = objshell.windows ' each o in objshellwindows surl = "" 'check url , if it's 1 want ' assign return value surl = o.locationurl if surl slocation & "*" set retval = o exit end if next o set getie = retval end function
Comments
Post a Comment