Runtime error 76: path not found error VB6 program on Windows 7

I have an older VB6 program that works fine on XP but gives a File Not Found error on Windows 7.
I'm trying to figure out how I can determine what path/file it is trying to access in order to try and resolve the issue.

Would anyone know how I can determine exactly what it is looking for but can't find?

I do not have the source code, only the compiled exe.

asantiaIT EngineerAsked:
Who is Participating?
it_saigeConnect With a Mentor DeveloperCommented:
If you are not getting a log file, WER (windows exception report) or Event Log entry, then you could use the Process Monitor from the Sysinternals library in order to determine which file the program cannot find.

Lee SavidgeCommented:
My guess is that it is the user profile. In XP it was under documents and settings and in Windows 7 it is under Users. These should be referenced by the %USERPROFILE% environment variable so Windows does the translation for you.

There is a function that returns the values in environment variables, and if memory serves it is a variant so you should cast it to a string. The function is environ()

Although this page shows VBA code in Excel, it shows how to list out all the environment variables:

It would be the user profile directory location change is your problem though. If not, it will be another special directory location change.
asantiaIT EngineerAuthor Commented:
That worked, thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.