Anyone know how I can rename the copied/pasted 'Arrow' to 'Arrow2'? As the code is written now, the 'Arrow' gets copied and the new shape is named 'Arrow' as well. I want it to be named 'Arrow2'
The way this works is I have an arrow shape that you click(macro) and it copies that arrow and pastes it into the selected cell at a certain position. It also formats the arrow to be a different color and applies a glow to it.
This code seems to work intermittently right now and I'm trying to figure out why. So, I'm trying what I described above first.
The way this works is I have an arrow shape that you click(macro) and it copies that arrow and pastes it into the selected cell at a certain position. It also formats the arrow to be a different color and applies a glow to it.
This code seems to work intermittently right now and I'm trying to figure out why. So, I'm trying what I described above first.
VBA Code:
Sub Arrow()
Dim Sh As Shape
With ActiveSheet
.Shapes("Arrow").Copy
.Paste 'inital position at selected cell
Set Sh = .Shapes(.Shapes.Count) 'the newest shape
End With
With Sh
'Set position
.Top = ActiveCell.Top
.Left = ActiveCell.Left
'fine tune position
.IncrementLeft 10
.IncrementTop 10
.OnAction = ""
With .Line
.ForeColor.RGB = RGB(192, 0, 0)
.Weight = 2.5
End With
With .Glow
.Color.ObjectThemeColor = msoThemeColorBackground1
.Radius = 3
End With
End With
End Sub