81jamesacct
New Member
- Joined
- Apr 23, 2024
- Messages
- 4
- Office Version
- 2016
- Platform
- Windows
Hi all,
I am new to macros and have been trying to maintain our department's macros that were built by someone who is no longer with the company. The macros are used to pull store data such as address, city, general ledger information and other data. I tried to make some changes to add some additional features which worked for about a month then suddenly crashed. I deleted the broken macros/addins and resaved the backup. Upon doing so, caused everyone to resave the add-in file or update on the macros. Unfortunately, there a few folks that when they try to turn on the macros they receive the error 76, path not found. I assisted everyone on updating the file on their computers and everyone has access to the corresponding network drive the reference tables are saved. Which is throwing me off, its the same paths, same steps, same access just different computers.
Sub UpdateLocalData()
Dim FSO As New Scripting.FileSystemObject
If Not FilePathsNamesSet Then SetFilenamesAndPaths
If Dir(NetworkDataPath & DataFileName) = "" Then Exit Sub
If Dir(LocalDataPath & DataFileName) = "" Then GoTo UpdateLocal:
If FileDateTime(NetworkDataPath & DataFileName) > FileDateTime(LocalDataPath & DataFileName) Then
GoTo UpdateLocal:
End If
Exit Sub
UpdateLocal:
FSO.CopyFile Source:=NetworkDataPath & DataFileName, _
Destination:=LocalDataPath & DataFileName, _
overwritefiles:=True
End Sub
Bolded portion is the part that debugger says path is not found.
I am new to macros and have been trying to maintain our department's macros that were built by someone who is no longer with the company. The macros are used to pull store data such as address, city, general ledger information and other data. I tried to make some changes to add some additional features which worked for about a month then suddenly crashed. I deleted the broken macros/addins and resaved the backup. Upon doing so, caused everyone to resave the add-in file or update on the macros. Unfortunately, there a few folks that when they try to turn on the macros they receive the error 76, path not found. I assisted everyone on updating the file on their computers and everyone has access to the corresponding network drive the reference tables are saved. Which is throwing me off, its the same paths, same steps, same access just different computers.
Sub UpdateLocalData()
Dim FSO As New Scripting.FileSystemObject
If Not FilePathsNamesSet Then SetFilenamesAndPaths
If Dir(NetworkDataPath & DataFileName) = "" Then Exit Sub
If Dir(LocalDataPath & DataFileName) = "" Then GoTo UpdateLocal:
If FileDateTime(NetworkDataPath & DataFileName) > FileDateTime(LocalDataPath & DataFileName) Then
GoTo UpdateLocal:
End If
Exit Sub
UpdateLocal:
FSO.CopyFile Source:=NetworkDataPath & DataFileName, _
Destination:=LocalDataPath & DataFileName, _
overwritefiles:=True
End Sub
Bolded portion is the part that debugger says path is not found.