How to improve the speed of VBA macro code?

前端 未结 7 1530
孤城傲影
孤城傲影 2020-12-06 07:11

I do not have much experience with writing macros, and therefore need the help of this community for the following issue encountered:

My macro copies a range of valu

7条回答
  •  攒了一身酷
    2020-12-06 07:35

    Just a few suggestions (would have posted as a comment but I guess I don't have the rep):

    1. Try refering to cell addresses instead of named ranges (doubt this would be the cause but may be causing some hit to performance)

    2. Do your workbook formulas contain links to other workbooks? Try testing the code on a file with broken links to see if it improves performance.

    3. If neither of these are the issue, my guess is that if the formulas are overly complex, there is probably some processing overhead being added. Try the code on a file containing only values to see if there is any improved performance.

提交回复
热议问题