Solved

Run Time Error

Posted on 1998-09-08
9
236 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
  • 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

808 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