+ Reply to Thread
Results 1 to 3 of 3

2010 macro not working in 2013 via button

  1. #1
    Registered User
    Join Date
    10-21-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2013
    Posts
    3

    2010 macro not working in 2013 via button

    The macro in the attached file combines the data from the tab 'email' and the tab 'website' into the tab called “combined”.

    When it's run in Excel 2010 the button gives the same result as when it's run via the editor. In Excel 2013 however, the button gives a different result than if I run directly from the editor but I cannot figure out why?

    Macro export.xlsm

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: 2010 macro not working in 2013 via button

    My guess, it is less to do with the version of excel, but more likely you have lots of "Select" and Activate" methods and properties in your code.
    Or you may have missed a dot with end with statements.
    If you have active cell or sheet, the code may/ may not work, depending on where the "Cursor" is while running by pressing a button may give you a different result as your cursor is on it. Try to avoid using "Select and active" unless you can not.

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: 2010 macro not working in 2013 via button

    Hi Paulie,

    Take a look at the attached workbook and see if it does what you need.

    As the previous post pointed out, the Activate and Select methods should not be used unless they are really necessary, but not using these methods means that you need to use fully-qualified references throughout your code - it is no longer possible to assume that the worksheet which currently happens to be active is in fact the one that you want your code to operate on!

    Anyway, I hope the attached is of some help to you - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

+ 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. Excel 2010 command button in shared workbook not working
    By penny in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2014, 08:15 PM
  2. 2010 macro runs slowly in 2013
    By PaulieNZ in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-24-2013, 09:00 PM
  3. Do 2010 and/or 2013 corrupt 2003 files?
    By Oppressed1 in forum Excel General
    Replies: 1
    Last Post: 07-09-2013, 02:49 PM
  4. Windows 8, Excel 2013 and Project 2010 - Reference Error in Macro
    By microsoftexcel007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2013, 06:23 PM
  5. Disable command button not working in excel 2010
    By cneha1991 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-30-2011, 07:36 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