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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
| Dim i As Byte
Private Sub CheckBox32_Click()
If CheckBox32.Value = True Then
Me.MultiPage1.Pages(1).Visible = True
Else
Me.MultiPage1.Pages(1).Visible = False
End If
End Sub
Private Sub CheckBox34_Click()
If CheckBox34.Value = True Then
Me.MultiPage1.Pages(3).Visible = True
Else
Me.MultiPage1.Pages(3).Visible = False
End If
End Sub
Private Sub CheckBox35_Click()
If CheckBox35.Value = True Then
Me.MultiPage1.Pages(2).Visible = True
Else
Me.MultiPage1.Pages(2).Visible = False
End If
End Sub
Private Sub CheckBox36_Click()
If CheckBox36.Value = True Then
Me.MultiPage1.Pages(7).Visible = True
Else
Me.MultiPage1.Pages(7).Visible = False
End If
End Sub
Private Sub CheckBox37_Click()
If CheckBox37.Value = True Then
Me.MultiPage1.Pages(4).Visible = True
Else
Me.MultiPage1.Pages(4).Visible = False
End If
End Sub
Private Sub CheckBox38_Click()
If CheckBox38.Value = True Then
Me.MultiPage1.Pages(5).Visible = True
Else
Me.MultiPage1.Pages(5).Visible = False
End If
End Sub
Private Sub CheckBox39_Click()
If CheckBox39.Value = True Then
Me.MultiPage1.Pages(6).Visible = True
Else
Me.MultiPage1.Pages(6).Visible = False
End If
End Sub
Private Sub CheckBox40_Click()
If CheckBox40.Value = True Then
Me.MultiPage1.Pages(8).Visible = True
Else
Me.MultiPage1.Pages(8).Visible = False
End If
End Sub
Private Sub CommandButton1_Click()
Enregistrer
End Sub
Private Sub CommandButton10_Click()
Enregistrer
CreateObject("Wscript.shell").Popup " Vos modifications ont été prises en compte ", 30, " Gestion du Terminal Mobile ", vbInformation
End Sub
Private Sub CommandButton9_Click()
Me.Hide
Enregistrer
End Sub
Private Sub OptionButton2_Click()
If UserForm1.OptionButton2.Value = True Then
TextBox4.Enabled = True
TextBox5.Enabled = True
Label6.Enabled = True
Label4.Enabled = True
Label7.Enabled = True
End If
End Sub
Private Sub OptionButton3_Click()
If OptionButton3.Value = True Then
TextBox4.Enabled = False
TextBox5.Enabled = False
Label6.Enabled = False
Label4.Enabled = False
Label7.Enabled = False
End If
End Sub
Private Sub UserForm_Initialize()
With Sheets("Feuil1")
For i = 1 To 8
Me.MultiPage1.Pages(i).Visible = False
Next i
End With
'Case cochée par defaut dans l'onglet APN
UserForm1.OptionButton3.Value = True
'Initialisation de la valeurs des TEXTBOX du UserForm1
With Sheets("Feuil1")
For i = 1 To 19
Me.Controls("TextBox" & i).Value = .Range("B" & i + 1).Value
Next i
End With
With Sheets("Feuil1")
For i = 30 To 40
Me.Controls("TextBox" & i).Value = .Range("B" & i + 1).Value
Next i
End With
'CHECKBOX
With Sheets("Feuil1")
For i = 1 To 12
Me.Controls("CheckBox" & i).Value = .Range("C" & i + 1).Value
Next i
End With
With Sheets("Feuil1")
UserForm1.CheckBox14.Value = Sheets("Feuil1").Range("C15").Value
UserForm1.CheckBox15.Value = Sheets("Feuil1").Range("C16").Value
End With
With Sheets("Feuil1")
For i = 18 To 32
Me.Controls("CheckBox" & i).Value = .Range("C" & i + 1).Value
Next i
End With
With Sheets("Feuil1")
For i = 34 To 40
Me.Controls("CheckBox" & i).Value = .Range("C" & i + 1).Value
Next i
End With
'ComboBOX
With Sheets("Feuil1")
For i = 1 To 12
Me.Controls("ComboBox" & i).Value = .Range("D" & i + 1).Value
Next i
End With
End Sub
Sub Enregistrer()
Dim i As Byte
With Sheets("Feuil1")
For i = 1 To 19
.Range("B" & i + 1).Value = Me.Controls("TextBox" & i).Value
Next i
End With
With Sheets("Feuil1")
.[B26] = TextBox25.Value
.[B27] = TextBox26.Value
.[C15] = CheckBox14.Value
.[C16] = CheckBox15.Value
End With
With Sheets("Feuil1")
For i = 30 To 40
.Range("B" & i + 1).Value = Me.Controls("TextBox" & i).Value
Next i
End With
With Sheets("Feuil1")
For i = 1 To 12
.Range("C" & i + 1).Value = Me.Controls("CheckBox" & i).Value
Next i
End With
With Sheets("Feuil1")
For i = 18 To 32
.Range("C" & i + 1).Value = Me.Controls("CheckBox" & i).Value
Next i
End With
With Sheets("Feuil1")
For i = 34 To 40
.Range("C" & i + 1).Value = Me.Controls("CheckBox" & i).Value
Next i
End With
With Sheets("Feuil1")
For i = 1 To 10
.Range("D" & i + 1).Value = Me.Controls("ComboBox" & i).Value
Next i
End With
End Sub |
Partager