Solved

Run Time Error

Posted on 1998-09-08
9
234 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…

762 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