?
Solved

Error after installing on other machines

Posted on 2001-06-10
2
Medium Priority
?
195 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 150 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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

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

764 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