+ Reply to Thread
Results 1 to 3 of 3

VBA to open in different browser

  1. #1
    obsessive
    Guest

    VBA to open in different browser

    Hi, I have a HTML viewer called Navroad (freebie on the web).
    I would like to load images, and HTML files, using this browser.
    How can I alter the following code to open the files in the
    aforementioned browser.

    This is the code I currently use...

    Private Sub CommandButton1_Click()
    Dim Picture As String
    Dim RETVAL
    Picture = "C:\" & Sheets("Sheet2").Range("C4").Value & ".jpg"
    RETVAL = Shell("EXPLORER " & Picture, 1)
    End Sub

    When viewed in NavRoad the title bar contains "NavRoad - C:\image1.jpg"
    ..
    The program process is identified as "nroad32.exe".

    Any help would be greatly appreciated.

    Regards


  2. #2
    Tom Ogilvy
    Guest

    Re: VBA to open in different browser

    did you try

    Private Sub CommandButton1_Click()
    Dim Picture As String
    Dim RETVAL
    Picture = "C:\" & Sheets("Sheet2").Range("C4").Value & ".jpg"
    RETVAL = Shell("nroad32.exe " & Picture, 1)
    End Sub

    --
    Regards,
    Tom Ogilvy

    "obsessive" <sbrophy1@shaw.ca> wrote in message
    news:1146875579.568281.126450@e56g2000cwe.googlegroups.com...
    > Hi, I have a HTML viewer called Navroad (freebie on the web).
    > I would like to load images, and HTML files, using this browser.
    > How can I alter the following code to open the files in the
    > aforementioned browser.
    >
    > This is the code I currently use...
    >
    > Private Sub CommandButton1_Click()
    > Dim Picture As String
    > Dim RETVAL
    > Picture = "C:\" & Sheets("Sheet2").Range("C4").Value & ".jpg"
    > RETVAL = Shell("EXPLORER " & Picture, 1)
    > End Sub
    >
    > When viewed in NavRoad the title bar contains "NavRoad - C:\image1.jpg"
    > .
    > The program process is identified as "nroad32.exe".
    >
    > Any help would be greatly appreciated.
    >
    > Regards
    >




  3. #3
    obsessive
    Guest

    Re: VBA to open in different browser

    Thanks for the reply Tom!
    I've been admiring your work on these excel groups for a while.
    Anyway, after searching a little more and playing with it I got it!!
    This is pretty cool... not only because it works, but because this
    offline viewer is easily configured to remove tool bars ... anyway...
    this worked ...

    Private Sub CommandButton1_Click()
    Shell "C:\Program Files\NavRoad HTML Viewer\nroad32.exe" & _
    " C:\" & Sheets("Sheet2").Range("C4").Value & ".jpg"
    End Sub

    Thanks again.
    Regards


+ 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