Need Macro To Open URL Link

L

Launchnet

In Excel I have www.ebay.com in cell K16.

Just below this cell I have a button (Macro) that when clicked, I want it to
open the Website.

Can someone show me how to activate the URL ?

Thanks In Advance.

Matt@Launchnet

--
Please take a look at www.openoursite.com Click on: "Keywords" and then
Click on "Matt's Story" and if you are a man, you should be very happy that
you read my story. God Bless for everyones help.

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/excel-functions/200708/1
 
G

Guest

The FollowHyperlink is nice and compact.

ActiveWorkbook.FollowHyperlink Address:="http://www.ebay.com",
NewWindow:=True

Add the "http://" part to your website string either in the macro or in the
cell. Excel complains without it.
 
L

Launchnet via OfficeKB.com

Thanks . . .
The website name in the cell is changed from time to time so I need something
like the following:

ActiveWorkbook.FollowHyperlink Address:="http://(ActiveCell.Value), NewWindow:
=True"

I tried this, but since my programming ability is so week I don't know the
syntax.
Can you help with this?

Thanks
Matt@Launchnet

- said:
The FollowHyperlink is nice and compact.

ActiveWorkbook.FollowHyperlink Address:="http://www.ebay.com",
NewWindow:=True

Add the "http://" part to your website string either in the macro or in the
cell. Excel complains without it.
In Excel I have www.ebay.com in cell K16.
[quoted text clipped - 7 lines]
Matt@Launchnet
 
D

Don Guillett

Sub gotourlvariable()
ActiveWorkbook.FollowHyperlink Address:="http://" & ActiveCell.Value
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
Launchnet via OfficeKB.com said:
Thanks . . .
The website name in the cell is changed from time to time so I need
something
like the following:

ActiveWorkbook.FollowHyperlink Address:="http://(ActiveCell.Value),
NewWindow:
=True"

I tried this, but since my programming ability is so week I don't know the
syntax.
Can you help with this?

Thanks
Matt@Launchnet

- said:
The FollowHyperlink is nice and compact.

ActiveWorkbook.FollowHyperlink Address:="http://www.ebay.com",
NewWindow:=True

Add the "http://" part to your website string either in the macro or in
the
cell. Excel complains without it.
In Excel I have www.ebay.com in cell K16.
[quoted text clipped - 7 lines]
Matt@Launchnet

--
Please take a look at www.openoursite.com Click on: "Keywords" and then
Click on "Matt's Story" and if you are a man, you should be very happy
that
you read my story. God Bless for everyones help.
 
G

Guest

Dim sURL As String
sURL = "http://" & ActiveCell.Value
ActiveWorkbook.FollowHyperlink Address:=sURL, _
NewWindow:=True


Launchnet via OfficeKB.com said:
Thanks . . .
The website name in the cell is changed from time to time so I need
something
like the following:

ActiveWorkbook.FollowHyperlink Address:="http://(ActiveCell.Value),
NewWindow:
=True"

I tried this, but since my programming ability is so week I don't know the
syntax.
Can you help with this?

Thanks
Matt@Launchnet

- said:
The FollowHyperlink is nice and compact.

ActiveWorkbook.FollowHyperlink Address:="http://www.ebay.com",
NewWindow:=True

Add the "http://" part to your website string either in the macro or in
the
cell. Excel complains without it.
In Excel I have www.ebay.com in cell K16.
[quoted text clipped - 7 lines]
Matt@Launchnet

--
Please take a look at www.openoursite.com Click on: "Keywords" and then
Click on "Matt's Story" and if you are a man, you should be very happy
that
you read my story. God Bless for everyones help.
 
L

Launchnet via OfficeKB.com

Thanks to Don & NO NAME
Both work. I used a little of both and it also now checks to see if
activecell is blank and if so gives a message.

Anain, thanks for the help. I really appreciate it.

Matt@Launchnet

- said:
Dim sURL As String
sURL = "http://" & ActiveCell.Value
ActiveWorkbook.FollowHyperlink Address:=sURL, _
NewWindow:=True
Thanks . . .
The website name in the cell is changed from time to time so I need
[quoted text clipped - 26 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top