Solved

Error after installing on other machines

Posted on 2001-06-10
2
191 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

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…
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…
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…
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…

734 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