vba view open internet explorer window

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Thanks. I used the below code and it works pretty well. The only problem is it loads the page on the first tab I have in the already open explorer window. Is there and way to see if a website with an address is already open and if it is just use that window? If not, create a new window in that current explorer?
 
Upvote 0
Forgot to attach the code I used.


Code:
Sub TrackShipment(control As IRibbonControl)


Dim IE As Object
With CreateObject("Shell.Application").Windows
    If .Count > 0 Then
' Get IE
        Set IE = .Item(0) '.Item(.Count + 1)
    Else
' Create IE
        Set IE = CreateObject("InternetExplorer.Application")
        IE.Visible = True
    End If
IE.Navigate "whateverwebpage"
Set IE = Nothing
End With


End Sub
 
Upvote 0
Unfortunately, Im a novice when it comes to incorporating internet explorer with excel vba. Im not sure what part I would change to the web page I need or an that.
 
Upvote 0
It’s simple:
1. In the link provided copy the code of function NavigateTo() and paste it to your code module.
2. In the same module use it like this:
Rich (BB code):

Sub Test()
  NavigateTo "whateverwebpage" ' Replace "whateverwebpage" by URL
End Sub
 
Upvote 0

Forum statistics

Threads
1,212,933
Messages
6,110,756
Members
448,295
Latest member
Uzair Tahir Khan

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