• Screenupdating Not Working? (Excel 2003)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Screenupdating Not Working? (Excel 2003)

    Author
    Topic
    #468315

    The following code copies several rows of formulas and pastes the values in the row above.

    Code:
    Dim vSourceCells As Integer
    Dim vDestinationCells As Integer
        
        With Application
            .ScreenUpdating = False
            .DisplayAlerts = False
        End With
        
        'Copies income section
        For vSourceCells = 12 To 42 Step 3
            vDestinationCells = vSourceCells - 1
            Range(Cells(vSourceCells, 2), Cells(vSourceCells, 6)).Copy
            Range(Cells(vDestinationCells, 2), Cells(vDestinationCells, 5)).PasteSpecial xlPasteValues
        Next vSourceCells
        
        'Copies expense section
        For vSourceCells = 47 To 77 Step 3
            vDestinationCells = vSourceCells - 1
            Range(Cells(vSourceCells, 2), Cells(vSourceCells, 6)).Copy
            Range(Cells(vDestinationCells, 2), Cells(vDestinationCells, 5)).PasteSpecial xlPasteValues
        Next vSourceCells
        
        Range("B9").Activate
         
        With Application
            .DisplayAlerts = True
            .ScreenUpdating = True
        End With

    When the code runs, I can still see the cell pointer moving down the sheet.

    I’ve turned off screenupdating in the past, and thought that the screen ‘froze’ until screenupdating was set to true.

    Am I remembering wrong, or is screenupdating not working on my computer?

    Thanks,

    Viewing 2 reply threads
    Author
    Replies
    • #1219510

      Your memory is just fine!

      Could you upload the workbook so we can play with it?

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1219519

      Here is the a modified version of the file. {The original file contained some sensitive information.}

      As I was preparing this file on my home computer, I tested the macro (which runs on the sheet’s activate event) on both Excel 2003 and Excel 2007 and it worked like I expected.

      My conclusion is that there is some Excel setting on my work computer that is different than my home computer.

      Thanks,

    • #1219521

      Works just fine on my Win 7 / Office 2003 SP3 setup also.

      I can’t imagine what setting they could have changed except for the security level and that would prevent the VBA from running at all.

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    Viewing 2 reply threads
    Reply To: Screenupdating Not Working? (Excel 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: