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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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,216,723
Messages
6,132,317
Members
449,718
Latest member
Marie42719

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