+ Reply to Thread
Results 1 to 3 of 3

Open Access Database From Excel

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Open Access Database From Excel

    Is there a way with VBA that I can simply open an access database?

  2. #2
    Valued Forum Contributor
    Join Date
    03-24-2014
    Location
    England
    MS-Off Ver
    Excel 2003 - 2016
    Posts
    575

    Re: Open Access Database From Excel

    yes, various different ways. I doubt you actually want to open the database though, just pull / push data to it?

    I'm a big fan of using SQL to access an Access Db, if you'll pardon the pun.

  3. #3
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Re: Open Access Database From Excel

    Yes I use SQL to query also. But all I want is to open an access database. Within the access database I have a AutoExc macro that will run as soon as the file is open and i want that to run after I have exported some file using excel , so I need a piece of code to open access at the bottom of my code.

    Example
    Sub Auto_Dump()
    '
    ' Auto_Dump Macro
    '
    
    '
        'ActiveWorkbook.RefreshAll
        Sheets("Inbound").Select
        Range("Z1:BC2").Select
        Range(Selection, Selection.End(xlDown)).Select
        Selection.Copy
        Workbooks.Add
        Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
            xlNone, SkipBlanks:=False, Transpose:=False
        Application.CutCopyMode = False
        ChDir _
            "S:\ISONAV BLAH BLAH\(S) Storage\Coll-GF\2-Rest\Dialler Live\Auto Dump Files"
        Application.DisplayAlerts = False
        ActiveWorkbook.SaveAs Filename:= _
            "S:\ISONAV BLAH BLAH\(S) Storage\Coll-GF\2-Rest\Dialler Live\Auto Dump Files\Import Files\InboundImport.xlsx" _
            , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
        ActiveWindow.Close
        Sheets("Outbound").Select
        Range("Table_Query_from_firstcl[[#Headers],[CallTypeCode]]").Select
        Range(Selection, Selection.End(xlToRight)).Select
        Range(Selection, Selection.End(xlDown)).Select
        Selection.Copy
        Workbooks.Add
        Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
            xlNone, SkipBlanks:=False, Transpose:=False
        Application.CutCopyMode = False
        Application.DisplayAlerts = False
        ActiveWorkbook.SaveAs Filename:= _
            "S:\ISONAV BLAH BLAH\(S) Storage\Coll-GF\2-Rest\Dialler Live\Auto Dump Files\Import Files\OutboundImport.xlsx" _
            , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
            
    OPEN ACCESS DATABASE HERE  "S:\ISONAV BLAH BLAH\(S) Storage\Coll-GF\2-Rest\Dialler Live\Database_2015.accdb"
    ActiveWindow.Close
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro in Excel to open Access database required
    By jan mason in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-04-2013, 05:34 AM
  2. Open Access database from Excel VBA?
    By proepert in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-08-2010, 11:14 AM
  3. Can you open Access Database through Excel VBA?
    By dj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-08-2006, 08:35 PM
  4. how to link an Access Database from excel if it required a password to open
    By amrezzat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-05-2006, 08:24 AM
  5. [SOLVED] Open Access database through excel
    By tinybears in forum Excel General
    Replies: 0
    Last Post: 05-03-2006, 06:55 PM
  6. Open Access Database from Excel
    By Manuel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-12-2006, 03:30 AM
  7. [SOLVED] Open Access Database through Excel
    By jojo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2005, 03:06 PM
  8. Open Access Database under and Excel window using a Macro
    By BMSpell in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-08-2005, 02: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