+ Reply to Thread
Results 1 to 3 of 3

Third party call works in Excel VBA but not Access VBA

  1. #1
    Registered User
    Join Date
    04-23-2013
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Third party call works in Excel VBA but not Access VBA

    I am using Windows 10, Office 2019 64 bit.

    I am calling a function in a third party dll with :

    Dim nreturn As Long

    nReturn = XPRMinit

    where XPRMinit is defined as :

    Declare PtrSafe Function XPRMinit Lib "xprm_rt" () As Long

    In Excel VBA, the code executes OK, but in Access VBA, I get a 'Run Time error '53' : File not found : xprm_rt message.

    The xprm_rt.dll file is located in a folder defined in the Environment Path variable. I have tried :

    1 copying it to Windows/System32

    2 Registering it (it fails)

    3 Adding it to VBA references (it wont)

    all without success

    and I can see XPRMinit in the Object browser.

    Any ideas please ?

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Third party call works in Excel VBA but not Access VBA

    is this you asking the question too?

    https://answers.microsoft.com/en-us/...e-93d472a88ffb

    it is verbatim.

    yeah, but did you try to add it in the dir where the access EXE is actually at? not sure which one that is. diff versions have different dirs where they are put by ms. u see this?

    https://answers.microsoft.com/en-us/...d-867d7f610916

    did you reg it with regsvr32 ?

  3. #3
    Registered User
    Join Date
    04-23-2013
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Third party call works in Excel VBA but not Access VBA

    Sorry, I did post it in the Microsoft forum and didn't action the 'multiposting' directive (I thought it was referring to multiple posts within the forum !).

    I did try regsvr32 but the message back was that it couldn't register the dll.

    HOWEVER, copying the dll to the access.exe location appears to work !!

    How can Excel find a dll using the Environment Path variable, but not Access !!!

    Anyway, thanks for your response

+ 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. Access form works with access Viewer but not full version of Access?
    By Shanyn in forum Access Tables & Databases
    Replies: 1
    Last Post: 10-22-2014, 01:14 PM
  2. Database options: Which works better with VB, excel, or access?
    By Mireya B. in forum Access Tables & Databases
    Replies: 0
    Last Post: 03-25-2013, 03:33 PM
  3. How do I access a 3rd party custom toolbar command?
    By bodisun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-02-2011, 01:16 PM
  4. Trying to call access functions in excel
    By DKY in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-19-2008, 03:38 PM
  5. Use excel vba to Call macro from Access
    By ppyxl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2006, 12:30 PM
  6. Excel vba to call Access Macro
    By ppyxl in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-06-2006, 09:42 AM
  7. Excel vba to call Access Macro
    By ppyxl in forum Excel General
    Replies: 0
    Last Post: 07-06-2006, 09:41 AM

Tags for this Thread

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