Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveSheet.Shapes.Count > 0 Then
If Not Intersect(Target, Range("C4")) Is Nothing Then
ActiveSheet.Shapes(ActiveSheet.Shapes.Count).Line.ForeColor.RGB = Target.Interior.Color
ElseIf Not Intersect(Target, Range("C6")) Is Nothing Then
ActiveSheet.Shapes(ActiveSheet.Shapes.Count).Line.ForeColor.RGB = Target.Interior.Color
ElseIf Not Intersect(Target, Range("C8")) Is Nothing Then
ActiveSheet.Shapes(ActiveSheet.Shapes.Count).Line.ForeColor.RGB = Target.Interior.Color
ElseIf Not Intersect(Target, Range("A4")) Is Nothing Then
ActiveSheet.Shapes(ActiveSheet.Shapes.Count).Line.Weight = 1
ElseIf Not Intersect(Target, Range("A6")) Is Nothing Then
ActiveSheet.Shapes(ActiveSheet.Shapes.Count).Line.Weight = 3
ElseIf Not Intersect(Target, Range("A8")) Is Nothing Then
ActiveSheet.Shapes(ActiveSheet.Shapes.Count).Line.Weight = 5
End If
End If
End Sub
This will change line thickness of last shape by double clicking A4/A6/A8
If you want to format more than 1 shape then select whilst holding CTRL. Then use the Format tab in the ribbon to apply new formatting to all selected shapes.
Bookmarks