Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Posts
    2

    Unanswered: 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.

  2. #2
    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

  3. #3
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •