Well, back for another question.
I'm doing some calculations in a module (the reason in a module is
because it is an I-O module - reading csv files, Access DB, etc.). (If
not in a Module, where should I put them.) From 'form1' I perform a
sub located in the module. As I read files and calculate, I want to
display the statistics of the records read and their calculations. I
posted a similar question a few days ago and was told to use
properties. I searched for examples and here's what I have set up as
a test.
In form1:
Public Property kkk() As String
Get
kkk = lblCntRecs.text
End Get
Set(ByVal Value As String)
lblCntRecs.Text = Value
End Set
End Property
In the Module:
Module Module1
Dim myform As New Form1
Public Sub testit()
Dim x As Long
For x = 0 To 9000000
If x Mod 1000 = 0 Then
myform.kkk = x.ToString("###,##0")
End If
Next
End Sub
End Module
The sub completes, but the label does not change during execution.
Only when the sub completes does the label change to the last value of
x.
What do I need to do to make the interim calcs/results appear on form1
during execution of the sub?
Hexman