Solved

Error after installing on other machines

Posted on 2001-06-10
2
188 Views
Last Modified: 2010-05-02
This program copys renames & relocates a file
The program picks up the location of the source file and the destination location from an external text file. This is done incase source or destination directories need to be changed. The problem is that after running the P&D wizard then installing it on another machine (without VB installed) it returns "Error '76' Path Not Found". Both the source & destination directories exist as does the file to be copied. The program doesn't seem to be reading the text file for some reason. The program works without any problems after being installed on my VB machine.
Any help would be much appreciated.

Thanks in advance
AndrewG
0
Comment
Question by:Andrew777
2 Comments
 
LVL 6

Accepted Solution

by:
kahlean earned 50 total points
ID: 6175035
is is due to your source file reside on the different drive on your machine. I meant all your source file might be at the d drive. During istallation the system might refering files from the other drive. Try to place it at the most common c drive

0
 
LVL 4

Expert Comment

by:wileecoy
ID: 6175131
Since you cannot step through the code on these machines to see where the error exists, maybe you can debug the problem by adding either a log file or temporarily, a message box.

I have used both depending on the complexity of the project and the extent of coding that would be necessary.

In all the areas that a path is references (either reading or writing) add a procedure call with the path as a parameter.  For example:

Private sub DebugMessage (sPath as string)

MsgBox sPath

End Sub

Then, in the code where you are getting ready to reference the path:

DebugMessage YourPath

This will display the path that the program is looking for before you get the error message.  You could also include other information such as what are of your code you are in.
For example:

Private sub DebugMessage (sPath as string, sProcedure as string)

MsgBox sPath & ", " & sProcedure

End Sub

when you call the procedure... let's assume you are in the code generated by Command1_Click (clicking a command button)

DebugMessage sPath, "Command1_Click"

-------------------------------------

Alternatively, you could also add error handling to see if the path exists, and if it doesn't - add code to handle the problem as you wish.

For example:

before you use the file add the following...

    Dim sFileNames As String
    Dim sPath As String
    sPath = "C:\autoexec.bat"
    sFileNames = Dir(sPath)
    If sFileNames = "" Then
        MsgBox "File Not Found - " & sPath
    End If

if the file is found the value of sFileNames will be just the name of the file, not the path.

If none of these work - post what other direction you may want to take.



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

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…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

920 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

17 Experts available now in Live!

Get 1:1 Help Now