I have a worksheet with a list of objectives in a column down the left and a list of users (pupils) in a row along the top (actually 2 rows merged together). The code below will automatically highlight an entire row and put a tick in every cell in that row. Or.....if the user clicks a pupil name along the top then it'll highlight that name, then if the user clicks an objective (row) it'll highlight and tick off all objectives down from the selected objective for the highlighted pupil only.
This code runs on the SelectionChange event and works absolutely fine, however, at first the code runs very fast but what seems to happen is the actual highlighting and ticking off of cells gets slower and slower until I give up, save it, exit excel and then reopen the spreadsheet. Then it's nice and quick again for a while.
Turning off screenupdating doesnt help either, it'll just sit at an hourglass for the same time it would have taken to update the cells and then suddenly update all the cells when the point in the code is reached where the screenupdating = true command is. It's almost as if memory limits are being reached but I thought an End Sub cleared all variables from memory.
What am I doing wrong?
Please Login or Register to view this content.
Bookmarks