bbk5
08-28-2007, 12:55 AM
Hi all,
I've written a series of macros in Excel which write values to a veryhidden tab within a workbook. The only problem is that as the size of the workbook grows, Excel takes longer and longer to do the same operation. I'm not sure why the size of the workbook would affect the performance this much. If I start with a relatively empty workbook, it takes about 10 seconds. With a workbook that's a bit more full, it can take up to 2 minutes to do the same operation. Here's an example of what I'm doing:
.Cells(curRow, nameCol) = "Relay " & i
.Cells(curRow, nameCol).Interior.color = MHEditor.Controls("RelayCheck" & i).BackColor
These lines are within a With that is using the veryhidden worksheet that is being written to. Any idea why such seemingly simple operations would take such a long time? I've stepped through the code to make sure it's not something else hogging up the time and each line, such as those above, takes way too long to complete.
Any help or speculation would be greatly appreciated!
I've written a series of macros in Excel which write values to a veryhidden tab within a workbook. The only problem is that as the size of the workbook grows, Excel takes longer and longer to do the same operation. I'm not sure why the size of the workbook would affect the performance this much. If I start with a relatively empty workbook, it takes about 10 seconds. With a workbook that's a bit more full, it can take up to 2 minutes to do the same operation. Here's an example of what I'm doing:
.Cells(curRow, nameCol) = "Relay " & i
.Cells(curRow, nameCol).Interior.color = MHEditor.Controls("RelayCheck" & i).BackColor
These lines are within a With that is using the veryhidden worksheet that is being written to. Any idea why such seemingly simple operations would take such a long time? I've stepped through the code to make sure it's not something else hogging up the time and each line, such as those above, takes way too long to complete.
Any help or speculation would be greatly appreciated!