KTM
XLDnaute Impliqué
Salut chers tous
Je voudrais elaborer des listes déroulantes dans ma colonne Q
ça passe sur Excel sans probleme et par l'editeur VBA J'obtiens le code-ci:
Range("Q2").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.SmallScroll Down:=-102
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:= _
"=SI(P2=""STOCK DORMANT ""; rupture; SI(P2=""SURSTOCK""; rupture; SI(P2=""RUPTURE""; dormant_surstock)))"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Range("Q5").Select
Le probleme c'est que ce code ne marche plus quand il est réutilisé après, une erreur survient au niveau de la formule.
Quelquun pourrait-il m'aider à elucider cette enigme? Merci
Je voudrais elaborer des listes déroulantes dans ma colonne Q
ça passe sur Excel sans probleme et par l'editeur VBA J'obtiens le code-ci:
Range("Q2").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.SmallScroll Down:=-102
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:= _
"=SI(P2=""STOCK DORMANT ""; rupture; SI(P2=""SURSTOCK""; rupture; SI(P2=""RUPTURE""; dormant_surstock)))"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Range("Q5").Select
Le probleme c'est que ce code ne marche plus quand il est réutilisé après, une erreur survient au niveau de la formule.
Quelquun pourrait-il m'aider à elucider cette enigme? Merci