Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Here is a modified version of Andy Pope's Line_Direction.xls VBA
program at http://www.andypope.info/ngs/ng10.htm Sub pointer() Dim angle As Integer Dim Start As Double Dim ArrowHead As Shape Set ArrowHead = Sheets("data").Shapes("arrow2") For angle = 0 To 180 Step 10 With ArrowHead .LockAspectRatio = msoFalse .Left = 72 .Top = 210 .Rotation = angle .Height = 0.3 * (angle + 50) .Width = 0.3 * (1.5 * (angle + 50)) .Copy End With 'Sheets("chart1").SeriesCollection("track").Points (10).Paste Start = Timer Do While Timer < Start + 0.2 Loop Next angle End Sub It works as expected, but when I uncomment the Sheets...Paste line, I get the error message: Method 'Height' of object 'Shape' failed. If I comment out Height/Width, ...Paste works as expected. How can I get Height/Width and Paste to work together? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error trapped only while stepping through the code - Not triggered when run | Excel Discussion (Misc queries) | |||
Error trapped only while stepping through the code - Not triggered when run | Excel Discussion (Misc queries) | |||
Problem with VBA returning the contents of a long formula. | Excel Discussion (Misc queries) | |||
ERROR | Excel Discussion (Misc queries) | |||
Run-Time Error: You must select a shape | Excel Worksheet Functions |