+ Reply to Thread
Results 1 to 24 of 24

Excel 2003 macro won't work in Excel 2010

  1. #1
    Registered User
    Join Date
    08-06-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Excel 2003 macro won't work in Excel 2010

    I have an Excel 2003 macro that will not run in Excel 2010. The macro allows me to extract data from our accounting business system into Excel. However, since we have upgraded to Excel 2010 and Windows 7, the macro will not work. I'm told it is because 2010 is 64bit and runs a newer VBA7.
    I know almost nothing about VBA programing. Is there something I can do to make Excel 2010 run the old 32 bit macro? Is there a magic combatability switch?

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Excel 2003 macro won't work in Excel 2010

    I can't guarantee assistance on this, but can you post the code? That might help forum members identify lines that are incompatible. Also, when you say the macro doesn't work, do you mean it doesn't do anything, or does it throw an error code?

  3. #3
    Registered User
    Join Date
    08-06-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Excel 2003 macro won't work in Excel 2010

    Thanks BigAs,
    I get a Compile Error:
    The code in this project must be updated for use on 64-bit systems. Please review and update Declare statements and then mark them with the PtrSafe attribute.

    There appears to be multiple macros that run.
    -------------------
    -------------------
    Please Login or Register  to view this content.
    --------------------
    --------------------
    Last edited by Cutter; 08-07-2012 at 03:12 PM. Reason: Added code tags

  4. #4
    Registered User
    Join Date
    08-06-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Excel 2003 macro won't work in Excel 2010

    Please Login or Register  to view this content.
    Last edited by Cutter; 08-07-2012 at 03:12 PM. Reason: Added code tags

  5. #5
    Registered User
    Join Date
    08-06-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Excel 2003 macro won't work in Excel 2010

    Please Login or Register  to view this content.
    Last edited by Cutter; 08-07-2012 at 03:13 PM. Reason: Added code tags

  6. #6
    Registered User
    Join Date
    08-06-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Excel 2003 macro won't work in Excel 2010

    Please Login or Register  to view this content.
    Last edited by Cutter; 08-07-2012 at 03:14 PM. Reason: Added code tags

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Excel 2003 macro won't work in Excel 2010

    @ texan22

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel 2003 macro won't work in Excel 2010

    Why have you split the code across 4 posts? Firstly it is attempting to create a commandbar which are no longer supported in Excel 2010. Attach a workbook with the code in
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  9. #9
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel 2003 macro won't work in Excel 2010

    commandbars are supported in 2010.

    I reckon that either the JDISDATAEXTRACTOR_003Lib.JDISDataExtractor library is the problem or there are some api calls that have not been posted.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  10. #10
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel 2003 macro won't work in Excel 2010

    I was a bit short of time this morning, but CommandBars are not supported as such, they can be viewed in the Addins Tab

  11. #11
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel 2003 macro won't work in Excel 2010

    the shortcut menus (like Cell and Row) are commandbars and you can still create your own popup menus so they are still supported just not used for the main toolbars. ;-)

  12. #12
    Registered User
    Join Date
    08-06-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Excel 2003 macro won't work in Excel 2010

    Sorry about the multiple posts. I'm new. I tried to put the code in a "quick reply".

    I have attempted to attach a sample workbook.
    Attached Files Attached Files

  13. #13
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel 2003 macro won't work in Excel 2010

    you have api calls in module4 which need updating. the other referenced library may also be incompatible-hard to say without having it

  14. #14
    Registered User
    Join Date
    08-06-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Excel 2003 macro won't work in Excel 2010

    Thankyou all.
    It sounds like this is "above my pay-grade". I guess I will continue to use my work-a-round until we can hire someone to fix it. I was hoping there was a simple answer.

  15. #15
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel 2003 macro won't work in Excel 2010

    I can probably fix the apis for you-just not right this second. will try and do it after work if I have time or maybe tomorrow.

  16. #16
    Registered User
    Join Date
    08-06-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Excel 2003 macro won't work in Excel 2010

    @JP
    that would be great! Thanks

  17. #17
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel 2003 macro won't work in Excel 2010

    replace the code in your module4 with this and let me know if you have any problems
    Please Login or Register  to view this content.

  18. #18
    Registered User
    Join Date
    08-06-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Excel 2003 macro won't work in Excel 2010

    @JP
    Forgive my ignorance. Here is what I did. I simply copied the new code from you and then highlighted the old code in Module4 and pasted. It appears to have replaced the old with the new. However, I'm still receiving the error
    Compile error:
    The code in the project must be updated for use on 64-bit systems.
    Please review and updated Declare statements and then mark them with PtrSafe attribute.

  19. #19
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel 2003 macro won't work in Excel 2010

    my bad - was tired and I missed one. replace module4 code again with this
    Please Login or Register  to view this content.

  20. #20
    Registered User
    Join Date
    08-06-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Excel 2003 macro won't work in Excel 2010

    @JP
    I really appreciate your help.

    Ok. I closed and reopened the workbook. In Excel 2003, from the menu at the top, I would go to DATA>JDIS DATA EXTRACTOR>IMPORT EXTRACT FILES(Ctrl+M). From there I could give it the directory location in the JDIS Database. Since I don't have that option in Excel 2010, I tried to Ctrl+M (i presume that is the shortcut) and Now I have a new error.
    Compile error:
    Can't find project or library
    I suspect that it is trying to find the database file?

  21. #21
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel 2003 macro won't work in Excel 2010

    your buttons should be on the addins tab.

    open the vb editor and check tools-references to see if any are listed as MISSING:

  22. #22
    Registered User
    Join Date
    08-06-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Excel 2003 macro won't work in Excel 2010

    @JP
    one more thing. This line was highlighted in the ExtractDetail (Code):
    Dim ObjJDDE As JDISDATAEXTRACTOR_003Lib.JDISDataExtractor

    ---------- Post added at 09:44 AM ---------- Previous post was at 09:35 AM ----------

    MISSING: Registration Manipulation Classes
    MISSING: JDIS Data Extractor Type Library 3.0

  23. #23
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel 2003 macro won't work in Excel 2010

    either you are missing some programs on your machine now or you need to try and find the new location of the .dll files in use. the references dialog should tell you the name of the dll files and you can search for them on your pc (make sure to search in hidden and system folders too). if you can't find them you will probably need to talk to your tech support team.

  24. #24
    Registered User
    Join Date
    08-06-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Excel 2003 macro won't work in Excel 2010

    Quote Originally Posted by JosephP View Post
    either you are missing some programs on your machine now or you need to try and find the new location of the .dll files in use. the references dialog should tell you the name of the dll files and you can search for them on your pc (make sure to search in hidden and system folders too). if you can't find them you will probably need to talk to your tech support team.
    That sounds managable. I will check into that.
    Thanks JP!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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