Option Explicit
Public WS1 As Worksheet
Public MShape1, MShape2, MShape3, MShape4, MShape5, MShape6 As Shape
Sub InitVariables()
Set WS1 = Worksheets("GRAPHIQUE")
Set MShape1 = WS1.Shapes("RECT-UDL1D")
Set MShape2 = WS1.Shapes("Isosceles Triangle 2")
Set MShape3 = WS1.Shapes("Isosceles Triangle 5")
Set MShape4 = WS1.Shapes("Connecteur droit 6")
Set MShape5 = WS1.Shapes("RECT-UDL1L")
Set MShape6 = WS1.Shapes("RECT-PUDL1D")
End Sub
Sub ShapeInvisible()
Dim i As Integer
Dim Tableau()
InitVariables
With WS1
For i = 1 To 6
Tableau(i) = "MShape" & i
Debug.Print Tableau(i)
'MShape& i.Visible = False
Next i
'For i = 1 To .Shapes.Count
'.Shapes.Item("MShape" & i).Visible = False
'.Shapes("MShape" & i).Visible = False
'Shapes(i).Visible = False
'Shapes("North" & i).Visible = True
'Next i
End With
End Sub