Bartek
Board Regular
- Joined
- Jul 29, 2006
- Messages
- 54
Hi,
Not a real problem, but some technical oddities:
I was curious how different hardware platforms translates to speed of different operations in Excel VBA, so I tested three computers - old notebook (Mobile P4 1.8 processor, Geforce 2 Go GPU, WinXPP/Excel XP), rather old desktop (P4 2.8 processor, Geforce 4 MX, GPU Win2000/Excel 2000) and new notebook (Core Duo T2400, Mobility Radeon X1600 GPU, Win XPP/Excel 2003).
When it comes to operations like copying range (Range(X).Copy Range(Y)), modifying cells (With Cell(X)... value, interior etc) or purely mathematical calculations with VBA: desktop was about 60% faster than old notebook, and new notebook was about 40% faster than the desktop.
But there was one very strange exception: simple code to animate the shape, like this:
I ued the star shape (msoShapeStar) with 3D effect. DoEvents is necessary to update the screen. The system with Excel 2000 proved to be about 15 (yes - fifteen!) times faster than both old and new laptops win Excel 2002/2003. I tested some other shape operations and indeed - Excel versions after 2000 are much slower than Excel 2000 when it comes to displaying and refreshing shapes. Users will not notice the difference in typical, every day use of shapes, but it is still puzzling
When it comes to other findings, I also noticed that if multiple workbooks are open, this may slow down the operations on range and cells on an active workbook, even up to 20%. Internal calculations with VBA are unaffected by multiple workbooks.
Not a real problem, but some technical oddities:
I was curious how different hardware platforms translates to speed of different operations in Excel VBA, so I tested three computers - old notebook (Mobile P4 1.8 processor, Geforce 2 Go GPU, WinXPP/Excel XP), rather old desktop (P4 2.8 processor, Geforce 4 MX, GPU Win2000/Excel 2000) and new notebook (Core Duo T2400, Mobility Radeon X1600 GPU, Win XPP/Excel 2003).
When it comes to operations like copying range (Range(X).Copy Range(Y)), modifying cells (With Cell(X)... value, interior etc) or purely mathematical calculations with VBA: desktop was about 60% faster than old notebook, and new notebook was about 40% faster than the desktop.
But there was one very strange exception: simple code to animate the shape, like this:
Code:
for i=1 to 1000
ActiveSheet.Shapes("myshape").Rotation=(ActiveSheet.Shapes("myshape").Rotation+3#) Mod 360
DoEvents
next i
I ued the star shape (msoShapeStar) with 3D effect. DoEvents is necessary to update the screen. The system with Excel 2000 proved to be about 15 (yes - fifteen!) times faster than both old and new laptops win Excel 2002/2003. I tested some other shape operations and indeed - Excel versions after 2000 are much slower than Excel 2000 when it comes to displaying and refreshing shapes. Users will not notice the difference in typical, every day use of shapes, but it is still puzzling
When it comes to other findings, I also noticed that if multiple workbooks are open, this may slow down the operations on range and cells on an active workbook, even up to 20%. Internal calculations with VBA are unaffected by multiple workbooks.