Still getting me Open File()

  • Thread starter Thread starter mission2java_78
  • Start date Start date
M

mission2java_78

Guest
I've exhausted myself using functions such as GetObject, etc. For a method that will let me know whether another application is currently open or not. I need to know this because when we pass data via vba from Access to project at times I will get, "This file is read only, click save as to save the file and rename it" This is NOT a network issue in that the file has read/write access to me and several other users. The problem is other users may be viewing this file while someone else is sending data. So I need a method() / function() which will tell me if a file is not in use / in use.

Thanks team,
Jon
 
Jon,
When a file is open ie Word,Excel etc it leaves what I call a ghost file ( similar to the .ldb file in Access).
You could use the 'file search' method in VBA to see if these files exist. If they don't exist then send your data. If they do exist then you could try the Kill file command to give you exclusive access to the file. I don't know if the kill file command will work though you may just get a "Cannot delete file as it maybe write protected or in use " error.

Kev.
 
There are no "ghost" files to MS Project files.
Jon
 

Users who are viewing this thread

Back
Top Bottom