I tried to make an event but it doesn't work and I just don't understand why
First of all I've got a class named Simulation in witch I putted my Event like that
Public Event TourDébuté(ByVal intNoTour As Integer)
Then in a Sub I Raise the envent like that:
For intTours = 0 To mintNbTours
For intCases = 0 To UBound(mobjaCases)
If Not mobjaCases(intCases) Is Nothing Then
mobjaCases(intCases).Reproduit = False
End If
Next intCases
RaiseEvent TourDébuté(intTours)
For intCases = 0 To UBound(mobjaCases).....
Next intTours
Then I want to use it in a form in witch I wrote:
Private WithEvents mclsSimulation As Simulation
And finally I've made:
Private Sub mclsSimulation_TourDébuté(ByVal intNoTour As Integer)
lblÉtatSimulation.Caption = "Tour no." & intNoTour & " sur " & mclsSimulation.NbTours
End Sub
The purpose of it is to change my label when the event raise
Please help if you can
Thank
Grog
First of all I've got a class named Simulation in witch I putted my Event like that
Public Event TourDébuté(ByVal intNoTour As Integer)
Then in a Sub I Raise the envent like that:
For intTours = 0 To mintNbTours
For intCases = 0 To UBound(mobjaCases)
If Not mobjaCases(intCases) Is Nothing Then
mobjaCases(intCases).Reproduit = False
End If
Next intCases
RaiseEvent TourDébuté(intTours)
For intCases = 0 To UBound(mobjaCases).....
Next intTours
Then I want to use it in a form in witch I wrote:
Private WithEvents mclsSimulation As Simulation
And finally I've made:
Private Sub mclsSimulation_TourDébuté(ByVal intNoTour As Integer)
lblÉtatSimulation.Caption = "Tour no." & intNoTour & " sur " & mclsSimulation.NbTours
End Sub
The purpose of it is to change my label when the event raise
Please help if you can
Thank
Grog