View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default Error '1004' - the specified value is out of range.

Works fine in xl2000

"Chris" wrote:

Could someone please enlighten me as to why I get a runtime error from this
line of code. It was generated by Excel 2003 itself using the 'record macro'
command from the 'tools menu'. I selected 'record', then the rectangle shape
from the drawing tools menu, then dragged my cursor in the upper left corner
of my worksheet to the approx. size rectangle I wanted, then stopped
recording. When I try to run the macro, I get "Runtime error '1004' - the
specified value is out of range." I appreciate any response.

I
Sub Macro1()
'
ActiveSheet.Shapes.AddShape(msoShapeRectangle, 18#, 18#, 108#, 41.25). _
Select
End Sub