Bonjour,
J'intègre une validation de données dans une suite de cellule, grâce au code suivant :
Cependant je ne parviens pas à comprendre comment remplacer la plage par une variable
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 Dim V3 As Integer V3 = 12 While Sheets("Feuil1").Cells(V3, 1) <> "" Sheets("Feuil1").Select Cells(V3, 12).Select If Not ActiveCell <> "" Then With Selection.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="=Listes_menus_deroulants!$A$2:$A$27" .IgnoreBlank = True .InCellDropdown = True .ShowInput = True .ShowError = True End With End If V3 = V3 + 1 Wend Else
Merci par avance.
Cordialement.
Partager