none
Macro takes more time to be executed when activated through button inside sheet in Excel 2019 RRS feed

  • Question

  • Hello, I have a macro in excel 2019 which runs in less than 1 second directly through VBE (by pressing F5), or when I configure a button to the macro in the Ribbon (through options>customize ribbon).

    However, when I create a button (FormControlButton) inside the sheet area, and associate the same macro to this button, the macro takes at least 7 seconds to run.

    In any case, the macro runs normally, without any error message, just the delay when activated through the button inside the sheet. Other macros are slower as well, but this one is the most noticeable.

    If this information helps, my macro builds a jagged array with data (~4000 records) that is in another sheet, then sorts the array by bubble/quicksorting (tested both to check if the problem could be here, and it wasn't), then filters it and returns data in a new sheet.

    The macros where designed in excel 2010, and I noticed the problem right after our company updated microsoft office from 2010 to 2019. (Our windows was updated the same day from 2007 to 10, but I think the problem is in excel, as I tested it again in some of our PCs that still had office 2010 and the macros worked as fast as if run through VBE). Creating and editing macros is not prohibited by administrators.

    Does anybody have an idea of what may be happening?

    Thanks in advance
    Monday, July 29, 2019 3:07 PM

All replies

  • Hi,

    This is the forum to discuss questions and feedback for Microsoft Excel features, I'll move your question to the MSDN forum for Excel

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    Regards,

    Emi Zhang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Office 2019.

    Tuesday, July 30, 2019 1:54 AM