View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Chris S.[_2_] Chris S.[_2_] is offline
external usenet poster
 
Posts: 6
Default Error '1004' - the specified value is out of range.

Doug, thanks for checkiing it in xl03. After reading your results and
everyone elses, I went back and tried and failed again (something has to be
wrong). Then I tried it in a new xl '03 workbook and it worked fine. All I
can figure is that there was something incompatible in the workbook I was
originally trying it in. It was an old workbook that had its origin in xl
'95 but had been saved to newer formats as my xl was upgraded. It had been
working fine with other '03 features till this little quirk appeared.

Thanks to all.

"Doug Glancy" wrote:

Chris,

This is what I record in XL 03. It works when I run it:

ActiveSheet.Shapes.AddShape(msoShapeRectangle, 46.5, 43.5, 316.5, 240#).
_
Select

I also ran your exact code and it worked.

Doug

"Chris S." wrote in message
...
Don, thanks for checking it out. Did xl2002 generate the same line of

code
during the record process? This is absolutely maddening to me because I
can't get the macro to run for making rectangles or ovals in xl2003. Are
there any xl2003 users out there who could try the record process.

"Don Guillett" wrote:

I just tested this in a regular module in xl2002 and it worked fine.

--
Don Guillett
SalesAid Software

"Chris" <Chris wrote in message
...
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