Link to home
Start Free TrialLog in
Avatar of hindersaliva
hindersalivaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Excel 2013 - VBA running sluggish

When I run this (straight forward code) in Excel 2010 the rows fill down nice and smoothly.
When I run it in Excel 2013 the display is 'not so smooth'/sluggish/'fills in blocks'. Can I make it run as smoothly as in 2010? Is there some 'hardware acceleration' or similar setting I need to adjust on my PC?
(yes, I tried running Excel in Safe Mode. Same)

SonyVAIO - Windows 7 64-bit, 6Gb RAM, Excel 2013 32-bit.


Thanks!

Sub GetDataApr()

    If ActiveSheet.Name <> "ExcelOMG" Then Exit Sub

    Call ClearAll         'clears a range

    Call DoColumnHeaders_Apr      'renames a few columns
    
    For iRow = 7 To 106
    
        Sheet2.Cells(iRow, 1).Value = Sheet3.Cells(iRow, 1).Value
        Sheet2.Cells(iRow, 2).Value = Sheet3.Cells(iRow, 2).Value
        Sheet2.Cells(iRow, 3).Value = Sheet3.Cells(iRow, 3).Value
        Sheet2.Cells(iRow, 4).Value = Sheet3.Cells(iRow, 4).Value
        Sheet2.Cells(iRow, 5).Value = Sheet3.Cells(iRow, 5).Value
        Sheet2.Cells(iRow, 6).Value = Sheet3.Cells(iRow, 6).Value
        
        Sheet2.Cells(iRow, 7).Value = Sheet3.Cells(iRow, 10).Value
        Sheet2.Cells(iRow, 8).Value = Sheet3.Cells(iRow, 11).Value
        Sheet2.Cells(iRow, 9).Value = Sheet3.Cells(iRow, 12).Value
        Sheet2.Cells(iRow, 10).Value = Sheet3.Cells(iRow, 13).Value
        Sheet2.Cells(iRow, 11).Value = Sheet3.Cells(iRow, 14).Value
        Sheet2.Cells(iRow, 12).Value = Sheet3.Cells(iRow, 15).Value
        Sheet2.Cells(iRow, 13).Value = Sheet3.Cells(iRow, 16).Value
        Sheet2.Cells(iRow, 14).Value = Sheet3.Cells(iRow, 17).Value
        Sheet2.Cells(iRow, 15).Value = Sheet3.Cells(iRow, 18).Value
        Sheet2.Cells(iRow, 16).Value = Sheet3.Cells(iRow, 19).Value
        Sheet2.Cells(iRow, 17).Value = Sheet3.Cells(iRow, 20).Value
        Sheet2.Cells(iRow, 18).Value = Sheet3.Cells(iRow, 21).Value
        Sheet2.Cells(iRow, 19).Value = Sheet3.Cells(iRow, 22).Value
        Sheet2.Cells(iRow, 20).Value = Sheet3.Cells(iRow, 23).Value
        Sheet2.Cells(iRow, 21).Value = Sheet3.Cells(iRow, 24).Value
        Sheet2.Cells(iRow, 22).Value = 0
        Sheet2.Cells(iRow, 23).Value = 0
        Sheet2.Cells(iRow, 24).Value = 0
    
    Next iRow

End Sub

Open in new window

SOLUTION
Avatar of Shanan212
Shanan212
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hindersaliva

ASKER

Hi Shanan, no sorry I didn't explain enough. I DO want the screen updating TRUE. It's for a screen recording on Camtasia for eLearning. The audience needs to see the data filling down as it does nicely on Excel normally.
Actually, sorry to trouble everyone. On Excel 2010 the same code runs even slower, though smoothly.

I do remember something like this going lightening fast. Hmmm .... was I dreaming?
ASKER CERTIFIED SOLUTION
Avatar of byundt
byundt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Neither was what I was looking for but they are both good advice in the general area of my question.

'Turning off animations inside Windows' helped on an earlier occasion.