Bonjour à tous,
Est ce que quelqu'un sait comment initialiser un userform dès son affichage? J'ai mis le code suivant dans le userform qui s'appelle "controle", mais impossible de l'initialiser à l'ouverture. Cependant le code intialize fonctionne si je le rattache à un bouton appelé ici "CommandButton1". Merci pour votre aide!
Private Sub controle_initialize()
Label1.Visible = False
Label2.Visible = False
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
Label6.Visible = False
Label7.Visible = False
Label8.Visible = False
Label9.Visible = False
Label10.Visible = False
Label11.Visible = False
Label12.Visible = False
Label13.Visible = False
Label14.Visible = False
Label15.Visible = False
Label16.Visible = False
Label17.Visible = False
Label18.Visible = False
Label19.Visible = False
Label20.Visible = False
Label21.Visible = False
Label22.Visible = False
Label23.Visible = False
'Label24.Visible = True
Label25.Visible = False
TextBox1.Visible = False
TextBox1.Value = ""
TextBox2.Visible = False
TextBox2.Value = ""
TextBox3.Visible = False
TextBox3.Value = ""
TextBox4.Visible = False
TextBox4.Value = ""
TextBox5.Visible = False
TextBox5.Value = ""
TextBox6.Visible = False
TextBox6.Value = ""
CheckBox1.Visible = False
CheckBox2.Visible = False
CheckBox3.Visible = False
CheckBox4.Visible = False
CheckBox5.Visible = False
CheckBox6.Visible = False
CheckBox7.Visible = False
CheckBox8.Visible = False
CheckBox9.Visible = False
CheckBox10.Visible = False
CheckBox11.Visible = False
CheckBox12.Visible = False
CheckBox13.Visible = False
CheckBox14.Visible = False
CheckBox15.Visible = False
CheckBox16.Visible = False
'CheckBox17.Visible = True
'CheckBox17.Value = False
'CheckBox18.Visible = True
'CheckBox18.Value = False
ComboBox1.Visible = False
Cmdvalider2.Visible = False
'Cmdannuler1.Visible = True
CmdRetour.Visible = False
End Sub
Est ce que quelqu'un sait comment initialiser un userform dès son affichage? J'ai mis le code suivant dans le userform qui s'appelle "controle", mais impossible de l'initialiser à l'ouverture. Cependant le code intialize fonctionne si je le rattache à un bouton appelé ici "CommandButton1". Merci pour votre aide!
Private Sub controle_initialize()
Label1.Visible = False
Label2.Visible = False
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
Label6.Visible = False
Label7.Visible = False
Label8.Visible = False
Label9.Visible = False
Label10.Visible = False
Label11.Visible = False
Label12.Visible = False
Label13.Visible = False
Label14.Visible = False
Label15.Visible = False
Label16.Visible = False
Label17.Visible = False
Label18.Visible = False
Label19.Visible = False
Label20.Visible = False
Label21.Visible = False
Label22.Visible = False
Label23.Visible = False
'Label24.Visible = True
Label25.Visible = False
TextBox1.Visible = False
TextBox1.Value = ""
TextBox2.Visible = False
TextBox2.Value = ""
TextBox3.Visible = False
TextBox3.Value = ""
TextBox4.Visible = False
TextBox4.Value = ""
TextBox5.Visible = False
TextBox5.Value = ""
TextBox6.Visible = False
TextBox6.Value = ""
CheckBox1.Visible = False
CheckBox2.Visible = False
CheckBox3.Visible = False
CheckBox4.Visible = False
CheckBox5.Visible = False
CheckBox6.Visible = False
CheckBox7.Visible = False
CheckBox8.Visible = False
CheckBox9.Visible = False
CheckBox10.Visible = False
CheckBox11.Visible = False
CheckBox12.Visible = False
CheckBox13.Visible = False
CheckBox14.Visible = False
CheckBox15.Visible = False
CheckBox16.Visible = False
'CheckBox17.Visible = True
'CheckBox17.Value = False
'CheckBox18.Visible = True
'CheckBox18.Value = False
ComboBox1.Visible = False
Cmdvalider2.Visible = False
'Cmdannuler1.Visible = True
CmdRetour.Visible = False
End Sub