Solved

Error after installing on other machines

Posted on 2001-06-10
2
190 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

830 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