#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Open Access

Hi

I need to determine if an access application is already
open from excel VBA.
I have no problems opening the file if it is already
closed but when i try to get the cureent access aplication
i get nothing.

Any help would be appreciated.
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Open Access

Try the following:

Function isAccessOpen() As Boolean
On Error Resume Next
Dim oAccessApp As Object
Set oAccessApp = GetObject(, "Access.Application")
If Err.Number = 429 Then
isAccessOpen = False
ElseIf Err.Number < 0 Then
MsgBox "Untrapped error: " & Err.Number & vbCrLf & Err.Description
isAccessOpen = False
Else
isAccessOpen = True
End If
Set oAccessApp = Nothing
End Function

/i.

"Stuart" wrote in message
...
Hi

I need to determine if an access application is already
open from excel VBA.
I have no problems opening the file if it is already
closed but when i try to get the cureent access aplication
i get nothing.

Any help would be appreciated.
Thanks



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
open access from excel ? יריב החביב Excel Discussion (Misc queries) 2 July 21st 08 01:49 PM
Open Access Database with VBA Keith Excel Discussion (Misc queries) 1 June 1st 05 07:18 PM
Excel cannot open Access MDB Neva Excel Discussion (Misc queries) 0 April 4th 05 08:35 PM
Open Ms Access File milo[_2_] Excel Programming 1 September 12th 03 09:34 PM
Open Excel from access John[_46_] Excel Programming 4 September 8th 03 05:44 PM


All times are GMT +1. The time now is 04:31 PM.

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

About Us

"It's about Microsoft Excel"