Macro to open a web page (1 Viewer)

diced

New member
Local time
Tomorrow, 04:30
Joined
Nov 30, 2007
Messages
6
Hi,

Can you someone please help me i am trying to create 2 macros that will open HTML pages.

The first is a live web page.

The second is a .MHT web archive file on the hard disk.

What command can i use to do this because i tried all the ones that i thought would work and have been unsuccessful so far.

Cheers
 

ted.martin

Registered User.
Local time
Today, 18:30
Joined
Sep 24, 2004
Messages
743
How are you intending to call the macros because if you do it through command buttons, this works

Private Sub Command0_Click()
Command0.HyperlinkAddress = "http://www.bbc.co.uk"
End Sub

Private Sub Command1_Click()
Command1.HyperlinkAddress = "c:\temp\contacts.xls"
End Sub
 

diced

New member
Local time
Tomorrow, 04:30
Joined
Nov 30, 2007
Messages
6
Thanks,
That worked perfectly. :D

Cheers
 

chaitanyat2001

New member
Local time
Today, 14:30
Joined
Jun 2, 2008
Messages
7
Need help

Hi Guys,
I am new to Macros. I need to load a web page when a macro is fired. So I am trying with the above code. But I am getting run time error 424 as Object Required with the above code. I can't understand where I am going wrong. I am trying the following code.

Private Sub Command0_Click()
Command0.HyperlinkAddress = "http://www.bbc.co.uk"
End Sub


Thanks in advance.
Chaitanya
 

boblarson

Smeghead
Local time
Today, 11:30
Joined
Jan 12, 2001
Messages
32,059
I posted an answer in your other post, but the easiest is just use:

FollowHyperlink "http://www.bbc.co.uk"
 

deafmetal1

Senior Chief
Local time
Tomorrow, 03:30
Joined
May 2, 2008
Messages
30
Maybe it's me, but I noticed the FollowHyperlink method is SLOOOOOOOOOWWWWWWWWWWWWWWWWWW to open IE and go to the page requested. And it keeps maximizing the window, so I set the open new window value to True, and it solved that. But it's still SIGNIFICANTLY slower than using a macro, but I'm trying to get rid of all my macros from here on out.

Appreciate any advice. Thanks.
 

kevin_Carr

New member
Local time
Tomorrow, 04:30
Joined
Sep 15, 2011
Messages
8
Hi,

thanks for the above code, it works well when wanting a new IE browser to open; but i would like to have a control within the form that becomes the web page:

eg. Click a range of buttons on the left, and a subform (or whatever you recommend) will display the webpage required.

Also, in some cases the website will only work when disabling the lan settings, is there a way to encode a button that will do that when opening that particular page?

Cheers
 

kevin_Carr

New member
Local time
Tomorrow, 04:30
Joined
Sep 15, 2011
Messages
8
Hi,

thanks for the above code, it works well when wanting a new IE browser to open; but i would like to have a control within the form that becomes the web page:

eg. Click a range of buttons on the left, and a subform (or whatever you recommend) will display the webpage required.

Also, in some cases the website will only work when disabling the lan settings, is there a way to encode a button that will do that when opening that particular page?

Cheers


Hi,

sorry but the LAN settings issue is still a problem. Has anyone worked out how to turn off proxies with just a command button?

Kev:banghead:
 

Users who are viewing this thread

Top Bottom