Navigate to URL without opening a browser

shoril

New Member
Joined
Nov 6, 2018
Messages
1
I need help with vba code to be directed to a URL without opening a browser. Having it pointed to the URL is sufficient to get me where I need to be.

"Followhyperlink" will navigate to the URL and open it in a browser. I just don't want a browser to open. I can use the URL in the background.

I hope this is explained well enough.
Thanks, Scott
 

Some videos you may like

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

strooman

Active Member
Joined
Oct 29, 2013
Messages
314
Code:
Sub testing()
[COLOR="#FF0000"]'Requires references. Hit Alt+F11 | Tools | References | and check:
'Microsoft HTML Object Library
'Microsoft XML, v6.0[/COLOR]
Dim XMLPage As New MSXML2.XMLHTTP60
Dim htmlDoc As New MSHTML.HTMLDocument
Dim URL As String
    
    URL = "https://www.yourwebsite.com"
    XMLPage.Open "GET", URL, False
    XMLPage.send
    
    htmlDoc.body.innerHTML = XMLPage.responseText
	
	'Do something with the information
    debug.print htmlDoc.body.innerHTML
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,122,892
Messages
5,598,702
Members
414,254
Latest member
MarieCo

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
Top