Solved

Run Time Error

Posted on 1998-09-08
9
239 Views
Last Modified: 2010-05-18
Hellow,

I created a setup program using the setup wizard of VB-5.0

After setup the program I tried to run it (in the same computer which the program was writed), I got en error mesage box such as: "Run-time error '76': Path not found"

What could be wrong and how can I fix it ???
0
Comment
Question by:s_lavie
[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
  • 6
  • 3
9 Comments
 
LVL 2

Author Comment

by:s_lavie
ID: 1433527
I'm not sure I understand were exactly should I specify the paths. Is it in the program itself or in the setup wizard. I tried to add them in the wizard in the 'File Summery' phase, but it didn't help. Please be more detailed in your unswer and give an example if possible.

Thanks.
0
 
LVL 2

Author Comment

by:s_lavie
ID: 1433529
Sorry but it didn't work, so I have to reject your unswer and give someone else (or yourself) another chance
0
 
LVL 2

Author Comment

by:s_lavie
ID: 1433531
I have tried to install in another PC, and the error was the same. Maybe I didn't understand your unswer as it is, so try an example.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 5

Expert Comment

by:yronnen
ID: 1433533
Does your program addresses an external file? A database or other data file?
0
 
LVL 5

Accepted Solution

by:
yronnen earned 50 total points
ID: 1433535
So why didn't you say so??

It's very simple. Error 76 means that your app is trying to call an external file which is not there.

Few solutions:
1. If the file is in the application directory (where the exe file is), use the app.path value which returns the exe directory. For example, if your app is at c:\program files\myapp\myapp.exe, you can use:
dim s as string
s=app.path
The value of s will be "c:\program files\myapp".
2. If the file is at a different location, a good solution will be to show the open file dialog at the first time to find the required file, and keep it's location in the registry, so the application will know where to find the file by itself next time.

Both of the above solutions require only few lines of code.
0
 
LVL 2

Author Comment

by:s_lavie
ID: 1433536
I've checked my program, and I'm tring to open a total of 8 files, all have a full path (and all files exist). Could it be a problam of loading icons (when the path defined in the object's property)???
Is there any way to realize what file makes that error???
0
 
LVL 5

Expert Comment

by:yronnen
ID: 1433538
Are you treating the icons as seperate files? Or do you mean vb's icons?

What I mean is that if you mean that the problem is with the form.icon (for example), than the answer is no. In this case the icons become part of the exe file.

It is what I've told you before. You have a wrong path to a file (or maybe mistyped the name of the file itself).

You can add some extra debuggin after each line to get the filename that gives you the troubles.
0
 
LVL 2

Author Comment

by:s_lavie
ID: 1433539
If I get you right, that error should have been appear also when I'm runnig the appl during development - but it dosn't, so all file names are correct arn't they???
What I like to know is, if it is possible for me to know the name of file that cause that error during runtime.
0
 
LVL 2

Author Comment

by:s_lavie
ID: 1433540
I found the bug - but I don't understand it. It was as this:

Private sub some_sub()

dir1.path = dir2.path + "subdir"
' the error was here but only in runtime

End sub

Private sub Form_load()

dir2.path = "dir"

some_sub

End sub

I solve it as I put   dir1.path = dir2.path   in Form_load()
after the line   dir2.path = "dir"

yronnen you didn't solve my problam, but you gave me a direction - thanks

0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month6 days, 13 hours left to enroll

623 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