Send URL from Excel to Open Web Page

jeffandtamara

New Member
Joined
Apr 27, 2009
Messages
18
I need to send a url to Internet explorer from VBA, which is already opened and logged in to an applicaiton.
I am guessing there might be a very direct way to do this,,,I can manually cut and paste and I get the desired results....
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi Jeff

I'd like to help but I need some more information. If you format the cells containing the URL as a hyperlink and simply click the hyperlink why does this not accomplish your goal?

If the website has a login requirement then it seems like we should be able to open the website in one IE window, log in and leave it idle. Then open the hyperlink in a different window. Because your IE cookies already know you are logged in, the website should not prompt you again.

If it must be done in VBA then I have had success with this code in the past...

Code:
Set IE = CreateObject("InternetExplorer.Application")
Application.Wait Now + TimeValue("00:00:01")
IE.Visible = True
IE.Navigate "[URL="http://relmgmt.worldnet.ml.com/relmgmt/SearchCP.aspx"]YOUR URL[/URL]"

I use the "Application.Wait" because my computer takes a moment to actually pull up the IE window before I can send an address.

More info on where you are running into trouble would help.

Cheers
Gino
 
Upvote 0
Thanks Gino...I tried to use a hyperlink...but it just kept brought up a new IE session and had to login again...
It might not be so bad to just cut and paste into the address bar of IE from excel,,,but I sure would like a more elegant solution.....
 
Upvote 0
Gino:
Looks like your code works very close to what I need. One problem or enhancement is that when I run the code multiple times, I get multiple IE browser windows open. Is there code to close IE browser window's....
Anyway, I can live with how it works now,...and Thank You very much!!
 
Upvote 0
Good stuff Jeff happy to help

If you end the bit of code that uses the Internet Explorer Window with

IE.Quit

it will close the window. If you want to make the focus of you macro back on to your Excel Spreadsheet try

AppActivate "Name of your spreadsheet"

the "name of your spreadsheet" is the text that appears across the top of the blue bar of the window.
 
Upvote 0

Forum statistics

Threads
1,224,504
Messages
6,179,142
Members
452,892
Latest member
JUSTOUTOFMYREACH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top