Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


App.path contains correct path yet cannot open file

Posted on 2003-03-11
Medium Priority
Last Modified: 2010-04-17
I 'caught' the correct path where the executable and the HTML-file can be found in App.Path .

I want to open the OpenMe.htm file when I click on a picture, so inside the Picture_OnClick it looks a bit like the following:

ToOpen = Shell(App.Path & "ShellExecute.exe /F:App.Path & OpenMe.htm")

After "/F:" there has to be the path of the file to open, but as you can see it's wrong. Yet, when I use quotes after "/F:", it gives an error.
Question by:Eenzaamheid
  • 3

Expert Comment

ID: 8114984
Try breaking your string like this:

"ShellExecute.exe " & App.Path & " OpenMe.htm"

Accepted Solution

samgiuoco earned 300 total points
ID: 8115058
Actually, I just remembered that App.Path doesnt store the ending "\", so you have to add it.

Shell(App.Path & "\ShellExecute.exe " & App.Path & "\OpenMe.htm")

Author Comment

ID: 8115085
Yup, works with the "\". Thanks!

Expert Comment

ID: 9447204
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Expert Comment

ID: 9447723
i recommend he give the points to me.. since im the only one that posted and he said i solved the problem

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Loops Section Overview

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question