Run Macro In MS Access from

Good Morning! Well last night was uneventful which……….I am ok with! Moving, kids, vacation planning, job stuff… was time to just sleep.

Anyway, I want to run a macro in an MS Access application from a application. Not complicated stuff but it is what I have for today. Have a great weekend!

Private Sub RunMacro(ByVal sMacro As String)
        Dim oAccess As Object
        oAccess = CreateObject("Access.Application")
        ‘ Open the database
            oAccess.Visible = True
        Catch e As Exception
            MsgBox("Macro is cancelled or does not exist")
            oAccess = Nothing
        End Try
    End Sub

Consulting Requests


Blog Front Page

Technorati Tags: ,,,,,,,,,

Windows Live Tags:,.NET Framework,csharp,Macro,Microsoft,Access,vacation,CreateObject,Application,database


  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: