Martunis99
New Member
- Joined
- Aug 16, 2021
- Messages
- 19
- Office Version
- 2016
- Platform
- Windows
Hi guys,
So I built a macro that copies some contents of files to one single sheet based on some cell values.
Since some of these files are extracted from a separate program that executes a few runs on different populations, the amount of data to be copied can sometimes amount to several thousand rows.
In an attempt to make the macro run faster, I put Application.ScreenUpdating = False in the beginning of my program and turned it back on again in the end.
However, when I disable screen updating the macro takes up to 3min to copy over 4 files, and when I don't disable screen updating the macro takes only 30sec to copy the exact same files.
Do you have any idea why in this instance disabling screen updating is actually making my macro slower?
(PS: I don't have any Select or Activates as advised and I tried to assign all my ranges to variables)
Thank you!
So I built a macro that copies some contents of files to one single sheet based on some cell values.
Since some of these files are extracted from a separate program that executes a few runs on different populations, the amount of data to be copied can sometimes amount to several thousand rows.
In an attempt to make the macro run faster, I put Application.ScreenUpdating = False in the beginning of my program and turned it back on again in the end.
However, when I disable screen updating the macro takes up to 3min to copy over 4 files, and when I don't disable screen updating the macro takes only 30sec to copy the exact same files.
Do you have any idea why in this instance disabling screen updating is actually making my macro slower?
(PS: I don't have any Select or Activates as advised and I tried to assign all my ranges to variables)
Thank you!