VBA Web Browser Enable Javascript/Blocked Content

Andy30acre

New Member
Joined
Jul 16, 2015
Messages
2
I created a webpage that I need to render in a Web Browser hosted on a User Form in excel. When I launch the User Form the page loads great but the JavaScript doesn't seem to be working. I saved the contents to a text file and launched it in IE. I noticed that there was a warning at the bottom of IE that reads "Internet Explorer restricted this webpage from running scripts or ActiveX controls." and there is a button that reads "Allow blocked content" when I click it then the page renders correctly.

I'm assuming that the webbrowser control is having the same issue. Is there a way in VBA to allow the blocked content programmatically so the javascript will run as it should?

Thank so much for any help you can offer.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
I think the web browser control uses IE internally, so you could try adding the site/URL to IE's trusted zone or lower the security settings to allow the script to run.
 
Upvote 0
I think the web browser control uses IE internally, so you could try adding the site/URL to IE's trusted zone or lower the security settings to allow the script to run.

I thought of that, however my problem is that the user will be sending the workbook via email to folks out in the real world. It would be less desirable for my client to have all the recipients adjust the internet security settings. For some it might not even be possible because their network admins don't allow them to make such changes. Ideally I could enable it for the Web control programmatically? If any one knows if that is even possible and how to do it that would be awesome. Thanks again for any input.
 
Upvote 0

Forum statistics

Threads
1,223,631
Messages
6,173,465
Members
452,516
Latest member
archcalx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top