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

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Using Access DBs from Excel

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Using Access DBs from Excel

Is it a db on a network drive or on your computer only? for shared or
exclusive access?

I don't know much about it, but i remember being in the case, years ago, of
an MS Access db sitting on a network drive in shared mode, and everytime
someone would use it, the db was automatically keeping track of the user by
adding his network name into a 'lock' (? can't remember exactly the name)
file saved in the same directory.
I was using that file to determine connected user and ask them to un-connect
so that we could maintain/modify the db.

Sorry i can't help more,
Sébastien

"Mister T" wrote:

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Using Access DBs from Excel


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 05:54 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"