Solved

Run Time Error

Posted on 1998-09-08
9
235 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
 
LVL 5

Expert Comment

by:yronnen
ID: 1433533
Does your program addresses an external file? A database or other data file?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

912 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now