?
Solved

App.path contains correct path yet cannot open file

Posted on 2003-03-11
6
Medium Priority
?
240 Views
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.
0
Comment
Question by:Eenzaamheid
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 

Expert Comment

by:samgiuoco
ID: 8114984
Try breaking your string like this:

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

Accepted Solution

by:
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")
0
 

Author Comment

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

Expert Comment

by:CleanupPing
ID: 9447204
Eenzaamheid:
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 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 

Expert Comment

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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Six Sigma Control Plans
Starting up a Project
Suggested Courses

777 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