I wanted to separate this issue from my other post that also contained a second issue that was resolved.
This code snippet worked fine in 7 but fails after upgrade to 10. I get "runtime error '5': Invalid call or argument" on fname = Dir:
Any idea why?
This code snippet worked fine in 7 but fails after upgrade to 10. I get "runtime error '5': Invalid call or argument" on fname = Dir:
Code:
oldpath = "\\DSGAIN01\Commercial_Printing\Work Flow\WEEKLY PRESS-DIST REPORTS - COMM\02 JACKSONVILLE\" & BUNIT & "\"
newpath = "\\DSGAIN01\Commercial_Printing\Work Flow\WEEKLY PRESS-DIST REPORTS - COMM\02 JACKSONVILLE\" & BUNIT & "\OUTSIDE DATE PARAM\"
fname = Dir(oldpath & AWN)
fnamea = oldpath & AWN
fnameb = newpath & AWN
If Len(Dir$(fnameb)) > 0 Then
Kill (fnamea)
GoTo SKIP
End If
Do While fname <> ""
Name oldpath & fname As newpath & fname
fname = Dir
Loop
Any idea why?