I've searched a lot of pages and don't have a clear answer to this.
I have VBA code which does a lot of processing of Word revisions and I'd like to display a userform to inform the user of what's happening.
I track two variables (TotalRevisionCount and RevisionIndex) which count the total number of revisions being processed, and the individual revision number respectively. I've declared these as public variables in my main module.
I'd like my userform to display "Processing revision 2 of 36". I think the code to do this is really simple but I just can't join the dots.
Help?
***UPDATE This is a cut down version of the calling code:
Sub TestSub()
updateTotal = 10000
PlsWaitForm.Show (False)
For i = 1 To 10000
UpdateNum = i
PlsWaitForm.Repaint
Next i
Unload PlsWaitForm
End Sub
...and this is what I have in my userform:
Sub DisplayStuff()
PlsWaitText.Caption = "Currently processing " & UpdateNum & " of " UpdateTotal & " records."
End Sub
TotalRevisionCountandRevisionIndexas public variables in your module, you should be able to use it from your Userform directly. If there are public variables sharing the same name across multiple modules (which is a bad practice) or you have a module-level (or even sub-level) variable of the same name (also a bad practice) in your Userform, then you can be specific by calling your module name followed by the variable e.g.Module1.TotalRevisionCountLabelcontrol? the Userform'sCaption? You need to give more specific details to help you properly or else all you can get from us is generic answer. @StuartLApplication.Statusbarword.tips.net/… @StuartL