+ Reply to Thread
Results 1 to 2 of 2

Macros work perfectly in Excel 2010 but generate some errors in Excel 2013

  1. #1
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,537

    Macros work perfectly in Excel 2010 but generate some errors in Excel 2013

    Greetings to everyone. For the last few years I have been volunteering my time to develop an application to keep track of and calculate the results of a cross country meet for a large number of schools. Bit by bit and with help from this forum, I have been able to write the necessary macros to do the job and they work perfectly in Excel 2010. I'm sure that the design of the macros can be improved, but they do work as they are written in Excel 2010. There are 10 modules, two userforms and several macros in ThisWorkbook. Each worksheet code module also has a macro. If I step through the macros in Excel 2013, they seem to work fine but when I click the buttons on each worksheet to run the macros in Excel 2013, errors are generated. If someone has the time to have a look at my problem, I would really appreciate it. The sheets are protected with "password". Please click here to download the file. I will gladly supply and additional information you may need. Many thanks in advance.

    Also posted at these links:
    http://www.mrexcel.com/forum/excel-q...el-2012-a.html
    http://www.ozgrid.com/forum/showthre...524#post750524
    Last edited by Mumps1; 07-02-2015 at 08:40 AM.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,537

    Re: Macros work perfectly in Excel 2010 but generate some errors in Excel 2013

    I thought I would respond to try and bring anyone viewing this thread up to date. First of all, I would like to thank Michael M. for his help and suggestions and the time he took to look at my file. I managed to trace the problem when running the macro in Excel 2013 to some code that unprotected a few sheets in the workbook. For some reason, this unprotecting action caused another sheet in the workbook to become active. Since the original sheet that was active when the macro was run was no longer the active sheet, errors were generated. I fixed the problem by forcing the active sheet to remain active using this code:

    Please Login or Register  to view this content.
    I have no idea why a different sheet was activated especially since the macro ran perfectly in Excel 2010. It couldn't have been any previous code because the unprotecting was done at the beginning of the macro. I did some research into the problem and I was able to find another person who experienced the same problem. I'm wondering if it could be a glitch in Excel 2013. Another issue I discovered was that Microsoft strengthened the security on sheet protection in Excel 2013 so that passwords cannot be so easily broken. Unfortunately, if a macro protects and unprotects sheets several times in a macro, the macro runs extremely slowly because of the new algorithm to protect and unprotect sheets. In Excel 2010, my macros ran almost instantaneously whereas in Excel 2013, it took around 20 seconds or more for them to run. Hopefully, Microsoft will do something about this problem in the near future. If anyone has some insights into these problems, I would appreciate their input. Thank you and again many thanks to Michael M.

+ 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. Macros written in Excel 2010 don't work in Excel 2013
    By Bukovnik in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 09-03-2015, 01:24 AM
  2. [SOLVED] Excel 2010 workbook macros do not work in 2013
    By voorhees404 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2015, 01:02 PM
  3. Spreadsheet macros working in Excel 2010 but not in Excel 2013
    By boatbabe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-15-2014, 12:03 PM
  4. [SOLVED] Created XLSM in Excel 2013, Customer Makes Change in Excel 2010 -> VBA,Formatting Errors
    By JPFold in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-13-2014, 09:51 AM
  5. [SOLVED] Can not work with macros in Excel... But works perfectly in Word
    By Oban in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-23-2012, 06:16 AM

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