View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Norman Yuan[_2_] Norman Yuan[_2_] is offline
external usenet poster
 
Posts: 16
Default Tough one; determine if an Access file is open

If the MS Access file you are trying to test is *.mdb/*mde (not *adp/*.ade),
then, you can simply check if there is a [databasefilename].ldb file exists
in the same folder as the *.mdb file.

Note, here is a small catch: if the *.mdb was previously opened and did not
get properly closed (for example, the computer crashed), then the *.ldb may
be left there.

"XP" wrote in message
...
I am using Office 2003 on Windows XP.

I need a VBA function to determine FROM EXCEL if a specific MS-Access file
is currently open.

Can someone please post example code that would determine this; ideally a
function that would return true or false.

Thanks much in advance.