initialisation USF1 à partir d'USF2
bonjour
a partir d'un bouton contenu dans un userform2 , je charge un userform1 via le code suivant
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
|
Private Sub OptionButton1_Click() 'saisie nouvelle fiche
Load UserForm1
UserForm1.Show
UserForm1.Frame2.Visible = False
UserForm1.Frame6.Visible = False
'UserForm1.Frame1.Visible = False
UserForm1.CommandButton3.Visible = False
UserForm1.CommandButton8.Visible = False
UserForm1.Frame1.Enabled = False
Unload UserForm2
End Sub |
Dans mon USF1, la procedure USF1_initialize doit remettre à zero les combobox et textbox present dans le USF1.
or la RAZ se fait pas dans les combobox et textboxx sur USF1 ?:(
la raz est effectué par le code suivant
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
'initialisation des textbox
TextBox3.Value = 0
TextBox2.Value = 0
TextBox1.Value = " "
TextBox6.Value = 0
TextBox4.Value = 0
'initialisation combobox
ComboBox1.Value = ""
ComboBox2.Value = ""
ComboBox3.Value = ""
ComboBox4.Value = ""
ComboBox5.Value = ""
ComboBox6.Value = 0
ComboBox8.Value = ""
ComboBox9.Value = ""
ComboBox13.Value = ""
ComboBox14.Value = ""
ComboBox15.Value = ""
ComboBox16.Value = ""
ComboBox17.Value = ""
ComboBox18.Value = ""
ComboBox19.Value = ""
ComboBox22.Value = ""
ComboBox23.Value = ""
ComboBox24.Value = ""
ComboBox25.Value = ""
ComboBox26.Value = ""
'autre initialisation
messagealerte = ""
TextBox1.Value = "" |