Excel Guides

Opening an HTML Page in a Macro in Excel

Opening an HTML Page in a Macro in Excel

You can use a macro to open an HTML page in Excel. To do this, you'll need to use the ShellExecute function. This function will take two parameters: the path to the HTML page, and the action to take. The action should be set to "open". For example:

ShellExecute "C:\mypage.html", "open"

This will open the HTML page at the specified path. You can also use a URL instead of a path, if you want. For example:

ShellExecute "http://www.example.com/", "open"

If you want to open the page in a specific browser, you can specify the browser's path as the second parameter. For example, if you want to open the page in Chrome, you would use this:

ShellExecute "C:\mypage.html", "chrome.exe"

Move beyond 

Excel

Get started with Causal today.
Build models effortlessly, connect them directly to your data, and share them with interactive dashboards and beautiful visuals.