Bonjour,
J'ai trouver un code VBA sur le net afin de pouvoir mettre 6 mises en formes conditionnelles soit une pour NORD EST, SUD OUEST, RAA, IDF, SUD, OUEST.
Il fonctionne mais le problème c'est que lorsque je veux glisser une cellule excel m'affiche une fenêtre où est inscrit :
Erreur d'execution '13'
Incompatibilité de type
Fin Débogage Aide
Je ne comprend pas ce que cela signifie. Il me surligne en jaune la phrase que je vous ai souligné.
Voici mon code VBA.
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Select Case UCase(Target) 'UCASE = convertion de la frappe en majuscule
Case "RAA"
With Selection.Interior
.ColorIndex = 7
.Pattern = xlSolid
End With
Case "IDF"
With Selection.Interior
.ColorIndex = 8
.Pattern = xlSolid
End With
Case "NORD EST"
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
Case "SUD"
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Case "SUD OUEST"
With Selection.Interior
.ColorIndex = 14
.Pattern = xlSolid
End With
Case "OUEST"
With Selection.Interior
.ColorIndex = 18
.Pattern = xlSolid
End With
End Select
End Sub
Merci de m'aider