Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Wojciech G.
 
Posts: n/a
Default Running Internet Explorer from Excel

How to run IE and go to specified webside from a VBA macro. But, WITHOUT
giving a IE's path ? It seems to be simly, but I tried even API without any
success
= how to get IE's path?
  #2   Report Post  
Tushar Mehta
 
Posts: n/a
Default

No need to worry about IE's path. Set a reference to Microsoft
Internet Controls then use something like:

Option Explicit

Sub test_VBA_and_IE()
Dim x As InternetExplorer
Set x = New InternetExplorer
x.Visible = True
x.Navigate "www.nytimes.com"
Do While x.ReadyState < READYSTATE_COMPLETE: DoEvents: Loop
End Sub

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
How to run IE and go to specified webside from a VBA macro. But, WITHOUT
giving a IE's path ? It seems to be simly, but I tried even API without any
success
= how to get IE's path?

  #3   Report Post  
Stephen Bullen
 
Posts: n/a
Default

Hi Wojciech,

How to run IE and go to specified webside from a VBA macro. But, WITHOUT
giving a IE's path ? It seems to be simly, but I tried even API without any
success
= how to get IE's path?


Personally, I just use ShellExecute, so it launches in the whatever browser
the user has set up:

Private Const WEB_SITE_URL As String = "http://www.mysite.com"
Private Const SW_SHOWNORMAL = 1
Private Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub lblWebSite_Click()
'Launch Web Site
ShellExecute 0, vbNullString, WEB_SITE_URL, vbNullString, _
vbNullString, SW_SHOWNORMAL
End Sub


Regards

Stephen Bullen
Microsoft MVP - Excel

Professional Excel Development
The most advanced Excel VBA book available
www.oaltd.co.uk/ProExcelDev


  #4   Report Post  
Wojciech G.
 
Posts: n/a
Default

Thanx for both.

"Wojciech G." wrote:

How to run IE and go to specified webside from a VBA macro. But, WITHOUT
giving a IE's path ? It seems to be simly, but I tried even API without any
success
= how to get IE's path?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
windows explorer to excel barrfly Excel Discussion (Misc queries) 2 July 27th 05 04:28 PM
Excel and internet reporting! marsupilami Excel Discussion (Misc queries) 0 July 26th 05 01:02 PM
windows explorer will not open an excel spreadsheet. hal Excel Discussion (Misc queries) 2 June 24th 05 02:07 AM
Problem opening Excel files from Windows Explorer aj Excel Discussion (Misc queries) 2 January 30th 05 06:37 PM
How do I print all sheets of an Excel workbook from explorer? Dave Walker Excel Discussion (Misc queries) 1 January 28th 05 09:19 PM


All times are GMT +1. The time now is 11:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"