Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wht wont this work?

Status
Not open for further replies.

briggsy79

Programmer
Feb 23, 2001
68
SE
Hi.
I have tried using this piece of code to start IE with my Help webpage.
Code:
Dim Path AS String
 Path = App.Path & "\Help\Intro.htm"

      openhelp = Shell("c:\program files\internet_ explorer\iexplore.exe" & Path, 1)
I get a File not found error but if i type in the same path without App.Path i.e. "C:\Unzipped\DAOlike\Help\Intro.htm" It works
 
Hello briggsy79,

I see one reason why it does not execute the IE the main reason is that there is no space between the path of the internet explorer and your html file. Try endering a space This will work.

Also there might be a problem if you try to use that program into a computer that does not have the operating system on the C drive. You can call the COM (actually is a automation) object of IE. see the example below:


private function StartIE(url as string)
Dim ie As InternetExplorer

Set ie = New InternetExplorer 'Create an instance of IE
ie.Navigate url
ie.Visible = True
end function


This will work as long as you have the IE installed and select from the VB project Refrences "Microsoft Internet Controls"

I Hope that this helped...

"The Camel will walk the Desert of programming once again ..."

Camel
 
Thanks Camel...
I missed that space and typed the subject line wrong...I must be tired.
Briggsy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top