Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Using Access DBs from Excel

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Query from Access into Excel cause Access to go to read only T Stephens Excel Discussion (Misc queries) 0 March 24th 09 04:17 PM
Can Excel access data from Access?! Al Excel Discussion (Misc queries) 5 April 5th 08 03:52 PM
export access to excel. change access & update excel at same time fastcar Excel Discussion (Misc queries) 0 June 24th 05 09:27 PM
access--excel--access Tim Excel Programming 2 February 6th 04 11:41 AM
How to access ACCESS from Excel! Gordon Cartwright[_2_] Excel Programming 3 November 8th 03 11:50 AM


All times are GMT +1. The time now is 08:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"