R
Red
All help is greatly appreciated, I can't work out whets wrong with the below
code. I'm trying to loop through all MPP files, open each and save it to an
Access Database. It runs fine for the first MPP but on the second I get the
following error:
"The file DBName & MPPFile cannot be deleted because it is open or being
used by another program"
Is this even the correct approach??
MPPFile = Dir(JobPath & J(i) & "\" & "*.MPP")
Do While MPPFile <> "" 'Start the loop
FileName = JobPath & J(i) & "\" & MPPFile
DBName = "<\\Hta-nt1\Project_plans\Project_Server.mdb>\"
FileOpen FileName, , , , , , , , , , , pjDoNotOpenPool
FileSaveAs DBName & MPPFile, , , , , , , , , "MSProject.MDB8"
MPPFile = Dir
Loop
code. I'm trying to loop through all MPP files, open each and save it to an
Access Database. It runs fine for the first MPP but on the second I get the
following error:
"The file DBName & MPPFile cannot be deleted because it is open or being
used by another program"
Is this even the correct approach??
MPPFile = Dir(JobPath & J(i) & "\" & "*.MPP")
Do While MPPFile <> "" 'Start the loop
FileName = JobPath & J(i) & "\" & MPPFile
DBName = "<\\Hta-nt1\Project_plans\Project_Server.mdb>\"
FileOpen FileName, , , , , , , , , , , pjDoNotOpenPool
FileSaveAs DBName & MPPFile, , , , , , , , , "MSProject.MDB8"
MPPFile = Dir
Loop