View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_4_] Jim Thomlinson[_4_] is offline
external usenet poster
 
Posts: 1,119
Default run-time error '1004': Application-defined or object-deifined

What is the value of RangeDepth when the program fails (It should be the same
as the value in F3 on sheet 1). If that value is not an integer between 1
and 32,700 then this will crash as it can not define the range to be
traversed.
--
HTH...

Jim Thomlinson


" wrote:

Jim,

The debugger indicates this line as the problem:

For Each MyObject In Worksheets("Sheet1").Range("A1Â*:A" & RangeDepth)
' Iterate through each element.

A co-worker was using this Macro without issue and it looks like
something changed.



Bob,

Happily I didn't create the Macro, I've been asked to fix it though.