therealjag
New Member
- Joined
- Nov 13, 2019
- Messages
- 2
Hi there,
I have a diagram where I've created over a 100 arrows. However I am trying to reverse the arrow heads from flat to triangle and vice versa but my code doesn't seem to be working. The code doesn't recognise the line/connector type so that I can reverse it. any ideas?
I have a diagram where I've created over a 100 arrows. However I am trying to reverse the arrow heads from flat to triangle and vice versa but my code doesn't seem to be working. The code doesn't recognise the line/connector type so that I can reverse it. any ideas?
Code:
Sub reversearrows()
Dm sh as Shape
For each sh in ActiveSheet.shapes
if sh.type = msoLine Then
if sh.line.beginarrowheadstyle = msoarrowheadnone Then
sh.line.beginarrowheadstyle = msoarrowheadtriangle
sh.line.endarrowheadstyle = msoarrowheadnone
elseIf sh.line.beginarrowheadstyle = msoarrowheadTriangle Then
sh.line.beginarrowheadstyle = msoarrowheadNone
sh.line.endarrowheadstyle = msoarrowheadTriangle
end if
end if
Next
End Sub