code a macro to go to a specific website

R

Rhonda

I wanted to know what line of code to use to make a macro
go to a specified web site?

Thanks!!!
 
T

TonyM

Rhonda

the following code will create a hyperlink in the active
cell, then take you to the webpage:-

Sub testHyperlink()

ActiveSheet.Hyperlinks.Add Anchor:=Selection,
Address:= _
"http://communities.microsoft.com/newsgroups/defaul
t.asp?
icp=Prod_Office&sLCID=US&newsgroup=microsoft.public.word.ne
wusers" _
, TextToDisplay:="test"
Selection.Hyperlinks(1).Follow NewWindow:=False,
AddHistory:=True

End Sub

hth,

Tony
 
R

Rhonda

How would I get the macro to go to the website and then
copy and paste a table back into sheet 2 starting at cell
BN?
 
S

shockley

You can use

Workbooks.Open (http://www.yahoo.com/)

This will open a new workbook with the webpage as the worksheet. The table
you are looking for will occupy a range of cells that you can then put where
you like.

HTH,
Shockley
 

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