Can I Share a MDE (which only has VBA Code) with other apps?

Discussion in 'Access VBA Modules' started by G, Jun 1, 2010.

  1. G

    G Guest

    I am using Access 2003, and I was thinking of creating a databe with just VBA
    code in modules. There will be functions in there that I would like to
    reference with other applications.

    Is it possible for me to reference some of the functions in the MDE database
    with Excel and use the function I was created in the MDE ???


    Thanks,

    G
     
    G, Jun 1, 2010
    #1
    1. Advertisements

  2. G wrote:

    >I am using Access 2003, and I was thinking of creating a databe with just VBA
    >code in modules. There will be functions in there that I would like to
    >reference with other applications.
    >
    >Is it possible for me to reference some of the functions in the MDE database
    >with Excel and use the function I was created in the MDE ???



    If you add a reference to the library db, any other db using
    the same version of Access can use any globally available
    variables, Functions and Subs.

    --
    Marsh
    MVP [MS Access]
     
    Marshall Barton, Jun 1, 2010
    #2
    1. Advertisements

  3. G

    david Guest

    You can't reference an MDE from Excel

    Unfortunately, the VBA project is stored inside a database in a
    special format known only to Access, and Excel can't get it out.

    The obvious solution would be to move your shared code to
    an ActiveX control built in VB5 or VB6, so that it could be
    shared by Access or Excel. Unfortunately, MS has discontinued
    VB5 and VB6, and there is no replacement product.

    There are some stupid work arounds -- you could rewrite
    as VB Script, then use a VB Script wrapper to get a COM
    object that you could register and use in Excel and Access --
    but that would generally be more work than just re-writing
    and copying the code between Access and Excel.

    For special purposes, you can create an Access Application
    object in Excel VBA, and use Excel VBA to control Access
    to use your MDE code, but that is only when you particularly
    want to use Access, Excel, and your Data at the same time--
    it's not generally a good solution for just sharing code, because
    starting a copy of Access just to use some shared code is
    generally too slow and flaky.

    (david)


    "G" <> wrote in message
    news:...
    >I am using Access 2003, and I was thinking of creating a databe with just
    >VBA
    > code in modules. There will be functions in there that I would like to
    > reference with other applications.
    >
    > Is it possible for me to reference some of the functions in the MDE
    > database
    > with Excel and use the function I was created in the MDE ???
    >
    >
    > Thanks,
    >
    > G
     
    david, Jun 2, 2010
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. JumboShrimps

    Open Access mde from code

    JumboShrimps, Feb 21, 2004, in forum: Access VBA Modules
    Replies:
    2
    Views:
    117
    Paul Overway
    Feb 21, 2004
  2. Milan
    Replies:
    2
    Views:
    186
    Milan
    Aug 31, 2004
  3. Brent E
    Replies:
    2
    Views:
    102
    Tim Ferguson
    Feb 4, 2005
  4. Harry H

    Use code to make a mde as reference

    Harry H, Dec 17, 2005, in forum: Access VBA Modules
    Replies:
    8
    Views:
    118
  5. Alistair F
    Replies:
    1
    Views:
    95
  6. DawnTreader

    Creating an MDE through Code

    DawnTreader, Sep 24, 2008, in forum: Access VBA Modules
    Replies:
    1
    Views:
    92
    Daniel Pineault
    Sep 25, 2008
  7. Kokanutt

    when converting to mde vba code does not work

    Kokanutt, Feb 10, 2009, in forum: Access VBA Modules
    Replies:
    6
    Views:
    277
    Kokanutt
    Feb 17, 2009
  8. slickdock

    Launch mde from another mde: fine tuning

    slickdock, Mar 1, 2010, in forum: Access VBA Modules
    Replies:
    1
    Views:
    264
    Daniel Pineault
    Mar 2, 2010
Loading...