I think this is a common(ish) problem. I'm running an AHK macro that copies a series of contiguous and non contiguous cells. The data copied gets loaded into some variables and later pasted into a webform. This works fine - once. I can copy and paste all of my data in one go successfully once before issues arise. Specifically I first experience major slow down.
I can watch the AHK macro visually move my mouse across the spreadsheet, select cells, but Excel is too busy working on updating the visual appearance of the workbook and going from cut copy to edit mode. After about half of a second, my AHK macro rapidly outpaces Excel. If I allow my macro to continue to run indefinitely, as it is set up to do, it will cause Excel to slow down further and further until visual elements on the workbook stop being updated at all. The window buttons, the minimize, maximize, and close buttons, all remain working regardless of how visually "broken" Excel becomes.
I can interact with control buttons on the workbook as though nothing is wrong. When a "screenupdate" procedure is run by VBA it unbreaks some of the visual updates. The spreadsheets and cells begin to update visually again but menu options and buttons remain visually broken.
For clarity, by "broken" I mean that all visual updates have stopped at all. When I select a cell no highlight surrounds the cell, when copying no dashes appear, when highlighting a range, no flashing highlight appears. When interacting with control buttons on the workbook they do not visually appear to be clicked, instead, the actions from the VBA operation simply happen. When clicking on ribbon buttons nothing changes visually. Whatever was displayed remains unchanged.
I'm thinking this is a byproduct of my macro's interaction speed with Excel. While developing other AHK macros for Excel in the past, I noticed that if I executed too many copy/paste commands too near to each other I would experience data loss or incomplete actions. Some copies would not fire at all even if the cell was selected, or an entire range of cells would be selected where only one should have been. Additionally, if a copy happens near enough to a paste operation neither will happen or only one will happen.
In other forums I've browsed for guidance some users mentioned that widespread use of formatting and conditional formatting may cause some of this slow down when performing normal-human-speed copy/paste operations. My workbook is stuffed with formulas and formatting. Specifically of the 8 cells I am copying with my macro, 5 of them will be raw text and the other 3 will be formula values. All 8 cells are on the same row, however, the rows must be filtered conditionally and remain filtered throughout the operation of the macro.
Any guidance is deeply appreciated.
I can watch the AHK macro visually move my mouse across the spreadsheet, select cells, but Excel is too busy working on updating the visual appearance of the workbook and going from cut copy to edit mode. After about half of a second, my AHK macro rapidly outpaces Excel. If I allow my macro to continue to run indefinitely, as it is set up to do, it will cause Excel to slow down further and further until visual elements on the workbook stop being updated at all. The window buttons, the minimize, maximize, and close buttons, all remain working regardless of how visually "broken" Excel becomes.
I can interact with control buttons on the workbook as though nothing is wrong. When a "screenupdate" procedure is run by VBA it unbreaks some of the visual updates. The spreadsheets and cells begin to update visually again but menu options and buttons remain visually broken.
For clarity, by "broken" I mean that all visual updates have stopped at all. When I select a cell no highlight surrounds the cell, when copying no dashes appear, when highlighting a range, no flashing highlight appears. When interacting with control buttons on the workbook they do not visually appear to be clicked, instead, the actions from the VBA operation simply happen. When clicking on ribbon buttons nothing changes visually. Whatever was displayed remains unchanged.
I'm thinking this is a byproduct of my macro's interaction speed with Excel. While developing other AHK macros for Excel in the past, I noticed that if I executed too many copy/paste commands too near to each other I would experience data loss or incomplete actions. Some copies would not fire at all even if the cell was selected, or an entire range of cells would be selected where only one should have been. Additionally, if a copy happens near enough to a paste operation neither will happen or only one will happen.
In other forums I've browsed for guidance some users mentioned that widespread use of formatting and conditional formatting may cause some of this slow down when performing normal-human-speed copy/paste operations. My workbook is stuffed with formulas and formatting. Specifically of the 8 cells I am copying with my macro, 5 of them will be raw text and the other 3 will be formula values. All 8 cells are on the same row, however, the rows must be filtered conditionally and remain filtered throughout the operation of the macro.
Any guidance is deeply appreciated.