Opening HTML page (1 Viewer)

sgtblitz

Registered User.
Local time
Today, 05:40
Joined
Feb 28, 2008
Messages
45
Hi there,

Is there any VB that I can assign to a button to open an offline HTML page that I have created onClick?

Thanks
 

namliam

The Mailman - AWF VIP
Local time
Today, 14:40
Joined
Aug 11, 2003
Messages
11,695
Just "Shell" it, should automigicaly open with Explorer...

shell "C:\Test\test.html",vbMaximizedFocus

Lookup the shell command in the help for more info
 

sgtblitz

Registered User.
Local time
Today, 05:40
Joined
Feb 28, 2008
Messages
45
ahh, but im getting an error for some reason, I entered the following:

Code:
Private Sub Command22_Click()
Shell "C:\Documents and Settings\Daniel\My Documents\New Briefcase\2516\TheKingsHouseSystem\Test.html", 3
End Sub

but i get an error saying:

"invalid procedure, call or argument"

Im guessing ive forgotten something (im not so profficient at VB :confused:)

any help please? :D
 

namliam

The Mailman - AWF VIP
Local time
Today, 14:40
Joined
Aug 11, 2003
Messages
11,695
Hmz, I get the same error...

This works tho :)
shell "Explorer H:\Test.html",vbNormalFocus
 

boblarson

Smeghead
Local time
Today, 05:40
Joined
Jan 12, 2001
Messages
32,059
I personally prefer to use the FollowHyperlink method:

FollowHyperlink "File:///C:\Documents and Settings\Daniel\My Documents\New Briefcase\2516\TheKingsHouseSystem\Test.html"
 

Users who are viewing this thread

Top Bottom