Name

workbook.FollowHyperlink(Address, [SubAddress], [NewWindow], [AddHistory], [ExtraInfo], [Method], [HeaderInfo])

Synopsis

Displays a web page in the default browser.

Argument

Settings

Address

The address of the web page to display.

SubAddress

A target within the requested web page.

NewWindow

True displays the browser window; False maximizes the browser window. Default is False.

AddHistory

Not used.

ExtraInfo

A string or byte array that specifies additional information for HTTP to use to resolve the hyperlink.

Method

msoMethodGet sends the request as an HTTP GET method; ExtraInfo is sent as a string appended to the address. msoMethodPost sends the request as an HTTP POST method; ExtraInfo is posted as a string or byte array.

HeaderInfo

A string specifying the HTTP header to be sent with the request.

For example, the following code displays my web site in a new, maximized browser window:

ThisWorkbook.FollowHyperlink "http://www.excelworkshop.com", , False

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.