ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Launching a website from Excel (https://www.excelbanter.com/excel-programming/287904-launching-website-excel.html)

Chris Gorham[_3_]

Launching a website from Excel
 
Hi,

At the end of every month I've written code that will
remind the user to update his version of my add-in from my
website www.mastertool.co.uk

It would also be nice to give the option of pressing a
button and launching internet explorer and the website...

I can do this by creating a hyperlink and simply recording
the action of selecting it...but there has to be a better
way.

Thks as always, I couldn't have created the add-in without
help from people on this site

Chris



Chip Pearson

Launching a website from Excel
 
Chris,

Try something like

ThisWorkbook.FollowHyperlink Address:="http://www.cpearson.com"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Chris Gorham" wrote in
message ...
Hi,

At the end of every month I've written code that will
remind the user to update his version of my add-in from my
website www.mastertool.co.uk

It would also be nice to give the option of pressing a
button and launching internet explorer and the website...

I can do this by creating a hyperlink and simply recording
the action of selecting it...but there has to be a better
way.

Thks as always, I couldn't have created the add-in without
help from people on this site

Chris





KJTFS[_27_]

Launching a website from Excel
 
Yes you can use the shell API

Private Declare Function ShellExecute _
Lib "shell32.dll" _
Alias "ShellExecuteA" ( _
ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) _
As Long
Sub OpenWebSite()
Dim r As Long
r = ShellExecute(0, "open", "http://www.kjtfs.com", 0, 0, 1)
End Sub



Keith
www.kjtfs.co

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 03:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com