I have created a huge VBA analysis code set (5000 lines+) that interrogates PLM (Aras, Windchill) design data to determine what division of a multi-divisional corporation created (owns) the part data.
The function DeriveCreByDiv() loops through 327,000 rows of excel data and uses the master function GetCreByDivision() to apply rules to determine what division owns the Part data.
To monitor the execution of a run I created am excel form that has fields like "Start Time", "Number of Rows", "Rows Completed", and "End Time".

The form has a button "Run Derivation" that executes the function DeriveCreByDiv().
In the function DeriveCreByDiv() I have the following lines of VBA:
To initiate the derivation run I implemented:
With DeriveCreatedByDivisionStatus
.startTime.Caption = Now()
.numberOfRows.Caption = CStr(gclastRowToExitFor)
.rowsCompleted.Caption = "1"
End With
To update the "Rows Completed" I implemented the following:
Application.EnableEvents = True ' enable event processing
statusCount = statusCount + 1
rowCnt = rowCnt + 1
If statusCount = 100 Then
With DeriveCreatedByDivisionStatus
.rowsCompleted.Caption = CStr(rowCnt)
End With
Application.Wait (Now + TimeValue("00:00:10"))
statusCount = 0
End If
The issues is that the "Rows Completed" field "rowsCompleted.caption" is not updating as the VBA function DeriveCreByDiv() runs.
The Form is Started with F5 I then click "Run Derivation"
Private Sub RunDerivation_Click()
EvalTools.DeriveCreByDiv
With DeriveCreatedByDivisionStatus
.endTime.Caption = Now()
End With
End Sub
In the Module "EvalTools" there is the Function DeriveCreByDiv. At the bottom of the main loop
For Each partRow In partWks.Rows
...
Application.EnableEvents = True ' enable event processing
statusCount = statusCount + 1
rowCnt = rowCnt + 1
If statusCount = 100 Then
With DeriveCreatedByDivisionStatus
.rowsCompleted.Caption = CStr(rowCnt)
End With
Application.Wait (Now + TimeValue("00:00:10"))
statusCount = 0
End If
Next partRow

.Repaintmethod?With Mein place ofWith DeriveCreatedByDivisionStatus