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 39
|
Sub OuvrirForm()
Dim Sel As String
If Chk_3G.Value = True Then Sel = Sel & 1
If Chk_3GS.Value = True Then Sel = Sel & 2
If Chk_4G.Value = True Then Sel = Sel & 3
'si déjà affiché, ferme celui en cours
'avant d'en affecter un autre à la variable
If Not Frm Is Nothing Then Unload Frm
Select Case Sel
Case "123"
Set Frm = UserForm1
Case "23"
Set Frm = UserForm2
Case "12"
Set Frm = UserForm3
Case "1"
Set Frm = UserForm6
Case "2"
Set Frm = UserForm5
Case "3"
Set Frm = UserForm4
Case "13"
Set Frm = UserForm7
Case Else
MsgBox "Vous devez faire un choix !"
Exit Sub
End Select
'non madal
Frm.Show (False)
End Sub |