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
| ' ********************************************************
' Fonction permettant de placer un graphique dans une page
' ********************************************************
Public Function Placer_Graphique(graphe As String, origine As Range, fin As Range)
Dim x_origine As Single
Dim y_origine As Single
Dim largeur_graphe As Single
Dim hauteur_graphe As Single
x_origine = origine.Left
y_origine = origine.Top
largeur_graphe = fin.Left + fin.Width - x_origine
hauteur_graphe = fin.Top + fin.Height - y_origine
With ActiveSheet.Shapes(graphe)
.Left = x_origine
.Top = y_origine
.Width = largeur_graphe
.Height = hauteur_graphe
End With
End Function |
Partager