Results 1 to 3 of 3

VBA to open Access DB

Threaded View

  1. #1
    Registered User
    Join Date
    08-01-2016
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    17

    VBA to open Access DB

    I am trying to open an Access Database from a button within Excel.

    However when I attempt to run it I get the following error:
    Compile Error
    User-defined type not definded

    on - db As Access.Application


    The code I am using is as follows:
    ------------------------------------
    Dim db As Access.Application

    Public Sub OpenDB()

    Set db = New Access.Application
    db.OpenCurrentDatabase "C:\Data\Report.accdb"
    db.Application.Visible = True

    End Sub
    Last edited by Moedeb27; 08-24-2016 at 07:21 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Open PDF from Combo Box in Access
    By acmagyar in forum Access Tables & Databases
    Replies: 4
    Last Post: 04-25-2014, 08:28 AM
  2. [SOLVED] Open access from excel
    By sebastienkanj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-21-2013, 05:04 AM
  3. Open MS-ACCESS and Run Saved Imports in Access
    By Manikanta546 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-18-2013, 08:05 AM
  4. Not able to open MS Access Form
    By jesika in forum Access Tables & Databases
    Replies: 0
    Last Post: 05-30-2009, 05:01 AM
  5. Open Access Report
    By Rose0402 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-31-2008, 11:36 AM
  6. Get the name of all workbooks open from access
    By Xav in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2005, 03:50 PM
  7. open excel from Access
    By dar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-06-2005, 12:06 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1