Open an URL using Excel VBA in MAC
I'm trying to Open an URL using Excel VBA in MAC and I want to close the Window after it loads.
I'm currently using this piece of Code so that I uses the Default browser to open the link, but need help on how to close the browser.
ActiveWorkbook.FollowHyperlink "https://www.google.com"
Sub test()
Dim h As Hyperlink
With Worksheets(1)
Set h = .Hyperlinks.Add(Anchor:=.Range("A1"), _
Address:="http://www.macnn.com")
h.Follow
h.Delete
.Range("A1").Clear
End With
End Sub
Both the above code open the link on the Default browsers. I can ask users to use Safari or Chrome in case I get to know the way I can close the browser instance.
Basically I want to open an URL where the browser windows doesn't show up the user and fetch the output. I'm in the process of writing a Function need help.Thanks for your help in Advance \(',')/
I'm trying to run the Code on Mac using Excel 2016
MacBook, Excel 2016