Hello all,
I need some help to add a vba counter to the status bar when running a vba loop? I know I need to use Application.StatusBar, but can't get it to run.
I need some help to add a vba counter to the status bar when running a vba loop? I know I need to use Application.StatusBar, but can't get it to run.
Code:
Sub ENGINE_24MTH()Dim dvCell As Range
Dim inputRange As Range
Dim c As Range
Dim i As Long
'Which cell has data validation
Set dvCell = Worksheets("UNIT ECONOMICS 24MTH").Range("E3")
'Determine where validation comes from
Set inputRange = Evaluate(dvCell.Validation.Formula1)
i = 2
'Begin our loop
Application.ScreenUpdating = False
Application.CutCopyMode = False
For Each c In inputRange
dvCell = c.Value
Worksheets("UNIT ECONOMICS 24MTH").Range("CopyRange").Copy
Worksheets("OUTPUT_24").Cells(i, "A").PasteSpecial xlPasteValues
i = i + 721
Next c
Application.ScreenUpdating = True
Application.CutCopyMode = True
MsgBox "Model update complete"
End Sub