+ Reply to Thread
Results 1 to 4 of 4

Running Internet Explorer from Excel

  1. #1
    Wojciech G.
    Guest

    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. #2
    Stephen Bullen
    Guest

    Re: Running Internet Explorer from Excel

    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



  3. #3
    Tushar Mehta
    Guest

    Re: Running Internet Explorer from Excel

    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 <[email protected]>,
    [email protected] 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?
    >


  4. #4
    Wojciech G.
    Guest

    RE: Running Internet Explorer from Excel

    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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1