Launching Browser To Specific URL From VB.NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chip Pearson

    #1

    Launching Browser To Specific URL From VB.NET

    I'm sure this is a simple question, but the answer eludes me. Using VB.NET
    in VS2008 running under Vista, how to I launch Internet Explorer (or the
    user's default browser) and have it open to a specific URL. I don't need to
    control the browser once it is open. All I need to do is open it up to a
    URL. E.g,

    Sub Button1_Click()
    Dim URL As String = "http://www.cpearson.co m"
    <what goes here>.Navigate Address:=URL
    End Sub

    Thanks in advance.


    --
    Cordially,
    Chip Pearson
    Microsoft Most Valuable Professional
    Excel Product Group
    Pearson Software Consulting, LLC

    (email on web site)


  • Steve Gerrard

    #2
    Re: Launching Browser To Specific URL From VB.NET

    Chip Pearson wrote:
    I'm sure this is a simple question, but the answer eludes me. Using
    VB.NET in VS2008 running under Vista, how to I launch Internet
    Explorer (or the user's default browser) and have it open to a
    specific URL. I don't need to control the browser once it is open.
    All I need to do is open it up to a URL. E.g,
    >
    Sub Button1_Click()
    Dim URL As String = "http://www.cpearson.co m"
    <what goes here>.Navigate Address:=URL
    End Sub
    >
    System.Diagnost ics.Process.Sta rt("http://www.cpearson.co m")


    Comment

    • kimiraikkonen

      #3
      Re: Launching Browser To Specific URL From VB.NET

      On Sep 18, 1:17 am, "Chip Pearson" <c...@cpearson. comwrote:
      I'm sure this is a simple question, but the answer eludes me. Using VB.NET
      in VS2008 running under Vista, how to I launch Internet Explorer (or the
      user's default browser) and have it open to a specific URL. I don't need to
      control the browser once it is open. All I need to do is open it up to a
      URL. E.g,
      >
      Sub Button1_Click()
          Dim URL As String = "http://www.cpearson.co m"
          <what goes here>.Navigate Address:=URL
      End Sub
      >
      Thanks in advance.
      >
      --
      Cordially,
      Chip Pearson
      Microsoft Most Valuable Professional
          Excel Product Group
      Pearson Software Consulting, LLCwww.cpearson .com
      (email on web site)
      That should also work:

      Shell("explorer .exe http://www.microsoft.c om", _
      AppWinStyle.Nor malFocus)

      HTH,

      Onur Güzel

      Comment

      Working...