+ Reply to Thread
Results 1 to 4 of 4

32 vs 64-bit invoking API

  1. #1
    Forum Contributor
    Join Date
    04-24-2012
    Location
    Karlstad, Sweden
    MS-Off Ver
    Excel 2016
    Posts
    232

    32 vs 64-bit invoking API

    Hi,

    On our company we are switching from 32 to 64-bit Office. I invoke API code and get compile error after installing 64-bit office. I've read online it's possible to get API to work on both 32 and 64-bit by applying code:

    Please Login or Register  to view this content.
    I've adapted my code to above but still I get syntax error below on 64-bit installed Office.

    Please Login or Register  to view this content.
    Any ideas what I'm doing wrong?
    1. Reply to thread and inform if suggestion was helpful or not
    2. Click on the star (=Add Reputation) if you think someone helped you
    3. Mark [SOLVED] to this thread if solution was found. (On Menu "Thread Tools" > "Mark this thread as solved")

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: 32 vs 64-bit invoking API

    There's nothing wrong with that though the compiler will turn the second section red. You can ignore that.
    Rory

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: 32 vs 64-bit invoking API


    Hi !

    Quote Originally Posted by Joakim N View Post
    I've read online it's possible to get API to work on both 32 and 64-bit
    As some can never work under a 64 bits version …


    Another point : since 2010 version an Excel 32 bits version VBA code may directly work with PtrSafe statement
    as the #IF block is necessary only for elder Excel versions like 2003, 2007
    like you can see in this thread sample well working whatever a 32 bits or a 64 bits Excel version …

  4. #4
    Forum Contributor
    Join Date
    04-24-2012
    Location
    Karlstad, Sweden
    MS-Off Ver
    Excel 2016
    Posts
    232

    Re: 32 vs 64-bit invoking API

    Thanks very much to both of you. Appreciate your help!

+ 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. If/Then for invoking subroutines or End?
    By rodrigt in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-15-2010, 05:02 AM
  2. invoking a add-in with an if statement
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2006, 05:10 PM
  3. [SOLVED] Invoking a macro from within another
    By jnsaunders in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2006, 09:25 AM
  4. invoking a macro
    By Al_C in forum Excel General
    Replies: 1
    Last Post: 04-30-2006, 02:50 PM
  5. invoking music through VB code
    By archeti in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-01-2005, 09:05 AM
  6. invoking an add-in from a macro?
    By JurgenBrea in forum Excel General
    Replies: 2
    Last Post: 04-28-2005, 04:06 PM
  7. use ADO invoking dbf file in excel
    By hedia.ccf in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2005, 11:06 AM
  8. popupmenu is not invoking the code
    By MVM in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-07-2005, 05: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