Macro to open a web page

diced

New member
Local time
Today, 15:34
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
 
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
 
Thanks,
That worked perfectly. :D

Cheers
 
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
 
I posted an answer in your other post, but the easiest is just use:

FollowHyperlink "http://www.bbc.co.uk"
 
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.
 
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,

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

Back
Top Bottom