Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK, great. Was not familiar with low level file io. Thank you.
"Tom Ogilvy" wrote: No. It uses the low level file io to open the file (in no application) exclusively. If it can be opened exclusively, then it is not opened in read/write mode by someone else. It has nothing to do with the file type or the application where the function might be used. Again, I know how to do what I want to the DB object after instancing it with the GetObject, but I need to know whether it's already in use before I even do my GetObject. And I offered a solution to that problem. -- Regards, Tom Ogilvy "Mister T" wrote in message ... Thanks, but I don't know if the procedures mentioned below work in my case. It seems like they rely on using the Open statement to attempt opening an Excel file within Excel and seeing if the file is locked. (Or the Word example attempts to open a Word file within Word.) What I'm trying to do is figure from Excel whether an Access file is already in use. So what makes my problem tricky is its inter-application nature. Again, I know how to do what I want to the DB object after instancing it with the GetObject, but I need to know whether it's already in use before I even do my GetObject. "Tom Ogilvy" wrote: http://support.microsoft.com?kbid=138621 XL: Macro Code to Check Whether a File Is Already Open http://support.microsoft.com?kbid=291295 XL2002: Macro Code to Check Whether a File Is Already Open http://support.microsoft.com?kbid=213383 XL2000: Macro Code to Check Whether a File Is Already Open http://support.microsoft.com?kbid=184982 WD97: VBA Function to Check If File or Document Is Open -- Regards, Tom Ogilvy "Mister T" wrote in message ... Hi, My problem is not about manipulating the Access object from my Excel VBA code. Rather, what I want is not to do these manipulations at all in the first place in case the Access DB is already open. So what I want to do is detect whether or not the DB has already been instanced. "sebastienm" wrote: Hi, Are you trying to query the database or do something else? If the first case: You can pull up data directly from Excel using the External Data featu menu Data Get (or Import) External Data New Database Query. There choose MS Access and follow the dialogs. In vba, it is similar to buikding a QueryTable object. (do the step above with the macro recorder On, then check at the automated code). I hope this helps, Regards, Sébastien "Mister T" wrote: In an Excel routine, I access an Access database with a GetObject. But before I do that, is there a way to find out if an instance of that particular DB has already been launched? Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Query from Access into Excel cause Access to go to read only | Excel Discussion (Misc queries) | |||
Can Excel access data from Access?! | Excel Discussion (Misc queries) | |||
export access to excel. change access & update excel at same time | Excel Discussion (Misc queries) | |||
access--excel--access | Excel Programming | |||
How to access ACCESS from Excel! | Excel Programming |