code a macro to go to a specific website

  • Thread starter Thread starter Rhonda
  • Start date Start date
R

Rhonda

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

Thanks!!!
 
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
 
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?
 
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
 
Back
Top