+ Reply to Thread
Results 1 to 4 of 4

VBA macro 2007 vs 2010 compatibility

  1. #1
    Registered User
    Join Date
    07-22-2015
    Location
    Lovosice, Czech republic
    MS-Off Ver
    2007, 2010
    Posts
    2

    VBA macro 2007 vs 2010 compatibility

    Hi there,

    I have a spreadsheet with very useful VBA macros but after reinstalling my computer and upgrading to MS Excel 2010 all VBA macros does not work :-( Any clue? You can find some example of one of non-functioning macro below:


    Please Login or Register  to view this content.
    What "does not work" means:
    In Excel 2007 this macro creates a PDF file saved in specific hard drive location form one selected list of spreadsheet. The file is automaticly named by a specific string of cells and letters.
    In Excel 2010 this macro produce and error message: "Run-time error '1004' The file wasn't saved. Possible reasons: The document is already opened or some errors during saving occured." (sorry for inaccuracy in translation from my native language) Note: The document is not already opened because is not even created.
    Any clue, experience?
    Thank you for your help in advance.

    Michal
    Last edited by Majkie79; 07-23-2015 at 01:21 AM. Reason: I was asked to ;-)

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    27,162

    Re: VBA macro 2007 vs 2010 compatibility

    After you edit your post to add CODE tags as described below, please explain what "does not work" means.
    • Does the code run?
    • Does it run but do nothing?
    • Does it produce error messages? If so, what do the messages say?
    • Does it produce unexpected/wrong results?
    • Does it hang?


    Please take the time to review our rules. There aren't many, and they are all important.

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    07-22-2015
    Location
    Lovosice, Czech republic
    MS-Off Ver
    2007, 2010
    Posts
    2

    Re: VBA macro 2007 vs 2010 compatibility

    Thank you for your comment. Hope your requirements are fullfilled now by editing my original post.
    Last edited by 6StringJazzer; 07-23-2015 at 07:12 PM. Reason: Quote of entire post removed --Moderator

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    27,162

    Re: VBA macro 2007 vs 2010 compatibility

    I ran your code in Excel 2010 and it ran fine. I had to make change to make it match my environment, plus you omitted a Sub statement:
    Please Login or Register  to view this content.
    The upgrade to 2010 is not your problem. I can think two reasons this may have failed.

    1. Something changed on your machine and D:\SkyDrive\Hornas\Pracovní listy\ is no longer a valid path. Open Windows Explorer and paste that path into the path box and see if it is there.
    2. There is some problem with the string in O15, such as a character that is invalid in a file name. What string are you using?

    Also, please do not quote an entire post, just to respond to it. I suggested you review our rules, and I still suggest you do that.

+ 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] Compatibility issue with code writen in excel 2007 and used in 2010
    By cdn_medic in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-03-2014, 06:32 PM
  2. [SOLVED] 2003/2007/2010 compatibility puzzle!
    By Mike Basingstoke in forum Excel General
    Replies: 5
    Last Post: 12-10-2013, 12:01 PM
  3. [SOLVED] VBA compatibility issues: Excel 2007, 2010, 2013
    By AdLoki in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-29-2013, 07:01 AM
  4. Compatibility issues with 2010 and 2007
    By keithaggies2019 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-30-2013, 01:37 PM
  5. VBA Compatibility between Excel 2007 and 2010
    By dwsteyl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-11-2013, 02:17 PM
  6. Excel 2007 : Compatibility issues with Excel 2010
    By relaj in forum Excel General
    Replies: 6
    Last Post: 02-14-2013, 12:39 AM
  7. Macro Compatibility Issue : Office 2003 and 2007
    By angeld27 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-19-2011, 01:03 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