Results 1 to 4 of 4

Thread: Opening URL in a new window?

  1. #1

    Thread Starter
    Hyperactive Member Asaf_99's Avatar
    Join Date
    Jul 2000
    Location
    Israel
    Posts
    335

    Question

    Hi!
    I have this in a module:
    Code:
    Public 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
    Public Function OpenURL(ByVal URL As String) As Long
    OpenURL = ShellExecute(0&, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus)
    This code opens a URL perfectly but I want a code for opening a URL in a new window.
    Any suggestions?
    ThanX.
    Asaf Sagi

    ICQ: 61917199
    E-Mail: [email protected]

  2. #2
    Guest
    It should open a new window.
    If no window is open, than it will open one.
    If not, than it will use the current open browser.

  3. #3

    Thread Starter
    Hyperactive Member Asaf_99's Avatar
    Join Date
    Jul 2000
    Location
    Israel
    Posts
    335
    That's my point!
    I want it to open a new window even when there's a window open. Less trouble that way
    Asaf Sagi

    ICQ: 61917199
    E-Mail: [email protected]

  4. #4
    Guest
    No need for the ShellExecute api function then.

    Code:
    Shell Chr(34) & "C:\Program Files\Internet Explorer\IEXPLORE.EXE" & Chr(34) & Chr(32) & "http://www.vb-world.net", vbNormalFocus

Posting Permissions

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



Click Here to Expand Forum to Full Width