PPRuNe Forums - View Single Post - Macros in Excel ...... ?
View Single Post
Old 23rd Feb 2007, 00:15
  #2 (permalink)  
Glen Livid
 
Join Date: Mar 2002
Location: UK
Age: 62
Posts: 6
Likes: 0
Received 0 Likes on 0 Posts
Go to Menu: Tools/Macro/Record New Macro and draw sample arrows and then format as required, then stop macro recording.

Press Alt + F8 (or Menu: Tools/Macro/Macros) and choose Edit and you will see the macro you have just recorded. You can edit the macro's AddLine Method to change the arrows as required. When you want to run the modified macro you can hit Alt + F8, select the macro and choose Run. You could also assign the macro to a button on your worksheet or to a new toolbar or menu command.

AddLine Method Example:
This example adds a blue dashed line to myDocument.
Set myDocument = Worksheets(1)
With myDocument.Shapes.AddLine(10, 10, 250, 250).Line
.DashStyle = msoLineDashDotDot
.ForeColor.RGB = RGB(50, 0, 128)
End With
Glen Livid is offline