Consulting

Results 1 to 2 of 2

Thread: Solved: reversed sequences in code

  1. #1
    VBAX Mentor
    Joined
    Sep 2004
    Posts
    431
    Location

    Solved: reversed sequences in code

    I acnnot understand why the userform shows before the first part of the code completes.


    Other than that the code works OK

    thank you
    Sub tfrtoreceivables()
    
    
    Application.ScreenUpdating = False
    Worksheets("Vault").Range("A3:CI1000").Copy
    Worksheets("Receivables").Range("A2").PasteSpecial
    Application.CutCopyMode = False
    
    With Worksheets("Receivables")
        Dim i As Long, lastrow As Long
    lastrow = Range("A65536").End(xlUp).Row
    For i = lastrow To 1 Step -1
      If Cells(i, "CI").Value = "" Then Rows(i).EntireRow.Select
      Selection.Font.ColorIndex = 3
      Selection.Font.Bold = False
     
    Next i
    
    End With
    [A2].Select
    UserFormAR.Show
    Application.ScreenUpdating = True
    End Sub
    Thank you for your help

  2. #2
    VBAX Mentor
    Joined
    Sep 2004
    Posts
    431
    Location
    Got it ... moved Application.ScreenUpdating = True higher and it now works
    Thank you for your help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •