If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > VBA Code to see if MS Access is already open

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-21-04, 12:14
zacl1217 zacl1217 is offline
Registered User
 
Join Date: May 2004
Posts: 2
VBA Code to see if MS Access is already open

Does anyone know how to tell if MS Access is already running using vba code in MS Excel.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 06-03-04, 09:54
michelin man michelin man is offline
Registered User
 
Join Date: Jan 2004
Location: austin
Posts: 146
i tried this in excel and it worked.

Code:
Sub usr_check()
Dim fso

Set fso = CreateObject("Scripting.FileSystemObject")
    
    If fso.FileExists("c:\Batch_be.ldb") Then
        
           
            MsgBox "Access is open!"
        
    End If

End Sub
Reply With Quote
  #3 (permalink)  
Old 06-03-04, 11:41
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
Another way to activate it, if it is open, and open it, if it isn't open:

Code:
Sub StartAccess()
    Application.ActivateMicrosoftApp xlMicrosoftAccess
End Sub
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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