PDA

View Full Version : Solved: reversed sequences in code



ndendrinos
10-30-2009, 07:32 AM
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

ndendrinos
10-30-2009, 07:34 AM
Got it ... moved Application.ScreenUpdating = True higher and it now works