Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Script opening Edge Webpage 1

Status
Not open for further replies.

Gary Ray

Technical User
Oct 10, 2021
2
GB
I have the below script which opens a webpage in Edge.

Set objShell = CreateObject("WScript.Shell")
objShell.Run "msedge
Struggling to find code to refresh the page once it loads - it doesnt need to be done more than once just when it loads.

The reason for this is when it loads in our citrix environment it doesn't load the site in IE Compatibility mode but when you refresh it does but cant ask users to do this :)
 
Have you tried a SendKeys method, i.e. adding something like:

Code:
Wscript.Sleep 3000
objShell.SendKeys "{F5}"

Also, consider using AppActivate in case a user does something to make the Edge window lose focus.

Hope this helps...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top