Hi everyone,
I have been experiencing random Excel crashes when I use the function "ComboBox.AddItem ArrayDirector(i, 1)". The code works perfectly 8 out of 10 times, but every once in a while Excel crashes at the same .AddItem function.
This problem only happens when I start my code/application, when the comboboxes are being initialized and loaded. After that, my function is called several times without any crashes.
Sub Box_Directeurs()
Dim num As Integer
Dim i As Integer
Application.EnableEvents = False
For i = 1 To 4
DirectorBox.AddItem ArrDirector(i, 1)
Next i
Application.EnableEvents = True
End Sub
Also, I've been having the same crashes when I change the caption of a label during the initialization (lbl.caption = currentWeek).
Any help would be greatly appreciated.
Thanks,
Peter
I have been experiencing random Excel crashes when I use the function "ComboBox.AddItem ArrayDirector(i, 1)". The code works perfectly 8 out of 10 times, but every once in a while Excel crashes at the same .AddItem function.
This problem only happens when I start my code/application, when the comboboxes are being initialized and loaded. After that, my function is called several times without any crashes.
Sub Box_Directeurs()
Dim num As Integer
Dim i As Integer
Application.EnableEvents = False
For i = 1 To 4
DirectorBox.AddItem ArrDirector(i, 1)
Next i
Application.EnableEvents = True
End Sub
Also, I've been having the same crashes when I change the caption of a label during the initialization (lbl.caption = currentWeek).
Any help would be greatly appreciated.
Thanks,
Peter