Hello,
Ik have a relative long Macro that needs to be executed when a userform is displayed.
First i put the macro code outside the userform, the macro therefore was only executed when the userform was closed.
After this i put the exact same code in the userform. But now all i get to see is a white userform and excel crashing on it
any one knows how you should do these two tasks simultaniously?
my code:
Sub mysub1()
Consolform.Show
ButtonInfra_Click
Consolform.ConsolLabel2.Caption = "l"
ButtonProducts_Click
Consolform.ConsolLabel2.Caption = "ll"
ButtonProcesses_Click
Consolform.ConsolLabel2.Caption = "lll"
ButtonEA_Click
Consolform.ConsolLabel2.Caption = "llll"
ButtonCIB_Click
Consolform.ConsolLabel2.Caption = "llll"
ButtonRM_Click
Consolform.ConsolLabel2.Caption = "lllll"
End Sub
This didn't work at all, next i put the code inside the userform this caused excel to crash.
Thanks for helping out.
Ik have a relative long Macro that needs to be executed when a userform is displayed.
First i put the macro code outside the userform, the macro therefore was only executed when the userform was closed.
After this i put the exact same code in the userform. But now all i get to see is a white userform and excel crashing on it
any one knows how you should do these two tasks simultaniously?
my code:
Sub mysub1()
Consolform.Show
ButtonInfra_Click
Consolform.ConsolLabel2.Caption = "l"
ButtonProducts_Click
Consolform.ConsolLabel2.Caption = "ll"
ButtonProcesses_Click
Consolform.ConsolLabel2.Caption = "lll"
ButtonEA_Click
Consolform.ConsolLabel2.Caption = "llll"
ButtonCIB_Click
Consolform.ConsolLabel2.Caption = "llll"
ButtonRM_Click
Consolform.ConsolLabel2.Caption = "lllll"
End Sub
This didn't work at all, next i put the code inside the userform this caused excel to crash.
Thanks for helping out.