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
| choix = Format(CStr([c2]), "00")
ActiveSheet.Shapes("FR-" & choix).Fill.ForeColor.SchemeColor = 3
If ActiveSheet.CheckBox1.Value = True Then
Pref = LTrim(Replace(ActiveSheet.Shapes("FR-" & choix).TextFrame2.TextRange.Characters.Text, vbLf, ""))
Pref = LTrim(Mid(Pref, 3))
Sheets(Pref).Visible = True
Sheets(Pref).Activate
End If
For Each sh In Sheets
If sh.Name <> "France" And sh.Name <> "Régions" And sh.Name <> "Départements" And sh.Name <> Pref Then
sh.Visible = False
End If
Next
With Feuil2
Set cel = .Columns(2).Find(Feuil1.Range("c2"), , , xlWhole)
If Not cel Is Nothing Then lig = cel.Row
End With
With UserForm1
.T2 = Feuil2.Cells(lig, 4): .T3 = Feuil2.Cells(lig, 3): .T4 = Feuil2.Cells(lig, 2): .T1 = Feuil2.Cells(lig, 2)
For i = 5 To 11
.Controls("T" & i) = Feuil2.Cells(lig, i)
Next i
.Show 0
End With |