I am just getting into vba scripting in Excel 2007, and I'm just mucking around to see if its useful.
So I created this basic script for filling a bunch of cells with values. And at the same time it loops through each worksheet. I have approx 10 worksheets in the excel document.
The script runs takes about 2,5 seconds to run...!?!?
NOTE: I know that the script is not really accomplishing anything useful. Thats not the point here. The point is that I am staggered that it takes 2,5 seconds to do such a basic operation!?
So my question: Is this normal?
I have a pretty new computer with plenty of computer power. I would expect this script to run in the blink of an eye?
Am I missing something?
Dim currSumRow As Integer
Dim currSumCol As Integer
'loop each column in turn from left to right >>>
For currSumCol = 5 To 10
'nested: loop each row from top to bottom
For currSumRow = 5 To 10
'nested: loop each sheet from first to last
For Each sht In Sheets
'put the string testing into each cell on the worksheet "test". Just for fun :) Worksheets("test").Cells(currSumRow, currSumCol).Value = "testing"
Next currSumRow 'end row loop
Next currSumCol 'end column loop