variable dans les paramètrea d'un rectangle

olhey

XLDnaute Occasionnel
bonjour amis xldien.

J'ai une pettie question:
Comment intégrer un nom de variable la dedans:

Code:
With Origine.Parent.Shapes.AddShape(msoShapeRectangle, Origine.Left + (posDeb * Echelle), Origine.[COLOR="Red"]Top[/COLOR], Longueur * Echelle, 3)

j'ai une variable string qui s'appelle cote

Code:
If .Range("O" & Cpt).Value = "g" Then
                Cote = "top"
                Else: Cote = "bottom"
                End If

j'aimerais que la position du rectangle change en fonction de cote mais je sais pas comment intégrer cote dans With Origine.Parent.Shapes.AddShape(msoShapeRectangle, Origine.Left + (posDeb * Echelle), Origine.Top, Longueur * Echelle, 3)

MERCI bcp et dsl de mon état de débutant
 

pierrejean

XLDnaute Barbatruc
Re : variable dans les paramètrea d'un rectangle

bonjour olhey

A tester:

Code:
If .Range("O" & Cpt).Value = "g" Then
  With Origine.Parent.Shapes.AddShape(msoShapeRectangle, Origine.Left + (posDeb * Echelle), Origine.[COLOR=red]Top[/COLOR], Longueur * Echelle, 3)
else
  With Origine.Parent.Shapes.AddShape(msoShapeRectangle, Origine.Left + (posDeb * Echelle), Origine.[COLOR=red]Bottom[/COLOR], Longueur * Echelle, 3)
end if

Edit:
Salut Minick :)
 

Membres actuellement en ligne

Aucun membre en ligne actuellement.

Statistiques des forums

Discussions
312 379
Messages
2 087 767
Membres
103 662
dernier inscrit
rterterert