VBA to open in different browser

O

obsessive

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
 
T

Tom Ogilvy

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
 
O

obsessive

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top