Bonjour,
J'ai trouvé sur le net un code VBA qui marche super pour une feuille bien précise, mais comment faire, si je dois sélectionner 3 onglets nommés Rapport1, Rapport2 et Rapport5 ?
Voici le code à adapter:
Sub SelectionnerEtTourner()
SelectionnerEtTourner Sheets("Feuil2"), 90, True
End Sub
Sub SelectionnerEtTourner(ByVal FeuilleShapes As Worksheet, ByVal AngleDeRotation As Single, ByVal AvecEncadrement As Boolean)
With FeuilleShapes
.Shapes.SelectAll
With Selection.ShapeRange
.IncrementRotation AngleDeRotation
With .Line
.Weight = 1
.ForeColor.RGB = RGB(0, 0, 0)
If AvecEncadrement = True Then
.Visible = msoTrue
Else
.Visible = msoFalse
End If
End With
End With
End With
End Sub
D'avance merci pour votre aide.
Frangil
J'ai trouvé sur le net un code VBA qui marche super pour une feuille bien précise, mais comment faire, si je dois sélectionner 3 onglets nommés Rapport1, Rapport2 et Rapport5 ?
Voici le code à adapter:
Sub SelectionnerEtTourner()
SelectionnerEtTourner Sheets("Feuil2"), 90, True
End Sub
Sub SelectionnerEtTourner(ByVal FeuilleShapes As Worksheet, ByVal AngleDeRotation As Single, ByVal AvecEncadrement As Boolean)
With FeuilleShapes
.Shapes.SelectAll
With Selection.ShapeRange
.IncrementRotation AngleDeRotation
With .Line
.Weight = 1
.ForeColor.RGB = RGB(0, 0, 0)
If AvecEncadrement = True Then
.Visible = msoTrue
Else
.Visible = msoFalse
End If
End With
End With
End With
End Sub
D'avance merci pour votre aide.
Frangil