How to turn off security prompts in VBA Excel when navigating to secure websites with

Whenever I'm trying to load a website, a security warning pops up asking:

"Do you want to view only the webpage content that was delivered securely?"

This popup is causing errors in my code. Is there a way to disable it using VBA?

Thank you.

Here's the code snippet:

Sub Start()

Dim ie As New InternetExplorer
Dim doc As HTMLDocument

ie.Visible = True

ie.navigate ("https://mywebsite.com")
ie.FullScreen = True
Do
DoEvents
Loop Until ie.readyState = READYSTATE_COMPLETE
Set doc = ie.document

doc.getElementById("navMenu2").Click

Answer №1

The reason behind the warning message is that you are on a secure SSL page (https protocol) trying to load non-secure content (http protocol).

To resolve this issue, you can take one of the following approaches:

  1. Access your website using http instead of https -
    ie.navigate("http://mywebsite.com")
  2. Address the security vulnerabilities on your website and avoid loading unsecured content when accessed via https.

If you need to fix it temporarily for testing purposes, you can modify the settings in your test browser:

  1. Go to Tools -> Internet Options -> Security
  2. Select the "Security" tab -> Click on the "Custom Level" button
  3. In the "Miscellaneous" section, change “Display mixed content” to Enable.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Sliding out list elements with jQuery ladder effect

I'm stuck on a seemingly simple task and need some guidance. facepalm. Currently, my site at this link has a menu list item issue where they all come out from the left side after the picture loads. I want them to slide out one by one, starting from t ...

Horizontal line chart in Chart.js or a customized version of the horizontal bar chart

I'm currently using chart.js to create a timeline showcasing events in relation to the current date. While the horizontal bar chart is useful, I would prefer displaying only the tips of the bars as points essentially transforming it into a horizontal ...

What is the method to fetch CSS properties in relative units like percentages and ems using the .css() function with the selector "$("selector")"?

Using jQuery to retrieve HTML element's css properties hasn't been as effective as desired. To test this issue, the following experiment was conducted: var div = document.createElement("DIV"); div.id = "testdiv"; var testZero = $(div).css("w ...

How can RobotFramework extract and verify the text within each span element of an alert?

I am facing an issue with an alert that contains multiple span elements with different error messages. My task is to verify if a specific message is present in that alert. For instance, in the image provided, one of the span elements displays the error mes ...

What is the best way to trigger an event in VueJS?

I recently implemented a table using Vuetify in my project. The table is now split into two components - the Table component and the Row component. My challenge is how to handle the same function, this.selected = !this.selected!, when dealing with 2 differ ...

detect and handle errors when deploying the Node.js function

I'm currently attempting to use code I found on Github to insert data into a Firestore database, but unfortunately, I keep encountering an error. Here's the specific error message: 21:1 error Expected catch() or return promise/catch-or-re ...

Modifying characteristics of a duplicated object will affect every object

After loading an OBJ file, I created a clone of it in an array. However, when I attempt to change the vertex color of one clone, all the clones are affected. How can I create independent clones with unique attributes? var oload = new OBJLoader(); oload.loa ...

Navigate to the following div container upon user interaction?

How can I make my gallery cycle through each holder when the user clicks on it? I'm encountering an issue where the div holder with text 1 is not closing and moving to the next holder as expected. Can you help me identify what's wrong with my Ja ...

Troubleshooting UV Mapping Problem in THREEJS JSON Model

After reviewing the json file for a 3D model, I came across the following line: "uvs": [[-3.21834,-1.65399,-3.21834,-2.57657,4.21834,-2.57657,4.21834,-1.65399,4.21834,-1.85233,4.21834,-2.7749,-3.21834,-2.7749,-3.21834,-1.85233,4.21834,0.961286,-3.21834,0 ...

Generate star icons dynamically within a div using C# and MSSQL data to determine the number of stars

Upon retrieving a rating (which can be more than 5) from the database, I aim to dynamically generate glyphicon stars based on the received value when the page loads. The code snippet below demonstrates how the value is retrieved: int rating_count = DBinte ...

Help with enabling the recognition of backspace key in JavaScript?

My current JavaScript is almost perfect but missing one key element. The form has two fields that are disabled when the user fills it out. <label>Can you drive? </label> <input type="booleam" id="drive" disabled><br> <label>W ...

Incorporating an HTML element into a Vue template

I'm currently utilizing a chart component (Chartist) that needs an HTML element to serve as a parent during SVG rendering. The elements that the chart requires are generated within a v-for loop, meaning they are not part of the DOM when the chart is ...

What is the recommended Firefox version that works seamlessly with Selenium Webdriver 3.6.0?

My current automation setup involves using Protractor with VS Code as my IDE. While I've successfully run my scripts on Chrome, I'm experiencing failures when attempting to run them on Firefox. It appears to be a compatibility issue. Can anyone p ...

Navigating to a New URL in Robotframework Without Closing the Browser After Working on the Old URL

Currently, I am working on a basic project that involves launching the Chrome browser and performing operations on two different websites. After completing tasks on the first website, I need to logout and then switch over to the second website. Here is an ...

Simultaneous running of two independent Python scripts using the subprocess module within the parent Python script

My goal is to run two subprocesses in parallel using Python. The first subprocess will start an HTTP server, while the second subprocess will execute a Python script generated by the Selenium IDE plugin. The Selenium script is designed to open Firefox, nav ...

Token not provided (Vue Stripe)

I am facing an issue while trying to process a payment using Stripe. Every time I click onPurchase, I receive an error message saying "no token provided". Can anyone assist me with this? Below is my Vue template where I call the function: <span class ...

Adjustable height for text input field

Is it possible to adjust the height of a textarea dynamically based on user input, rather than relying on scrollbars when content exceeds the width and height of the field? <textarea class="form-control"></textarea> For instance, if a user ty ...

What is the best way to navigate to a different page without triggering the default behavior with prevent

Is there anyone who can assist me in redirecting to another page (specifically, the "cart page")? I am currently using preventDefault() to ensure validation before redirecting, but even after validation, I am still stuck on the same page. Can someone pleas ...

Conceal the command prompt when using Selenium with ChromeDriver

var driverService = ChromeDriverService.CreateDefaultService(); driverService.HideCommandPromptWindow = true; var driver = new ChromeDriver(driverService, new ChromeOptions()); Is there a way to achieve the same functionality in Python? I have attempted ...

Updating to Angular 6 from backbone

At the moment, my current project is utilizing backbone js as a hybrid application. I am considering migrating this backbone Js application to angular 6, but first, I would like to understand why angular is superior to Backbone Js in the context of build ...