Runtime Error 1004: Application-defined or object-defined error

  • Thread starter Mary Hutchinson
  • Start date
M

Mary Hutchinson

Hello:
Any idea what's causing this error? I have run this before with
different scenario, but it now fails. It was written by others.
Thankyou,
Mary :confused:


' -- if buildable, process for partial constraints

If isBuildable Then
minBuildable = 100
Set partialConstraints = New Collection

' -- look for the primary (most restrictive) constraint on thi
polygon,
' -- count the total number of constraints

For Each cons In constraints
If wsLoad.Cells(rLoad, cConstraints(cons.Index)) = "1" Then
ERROR HERE
If cons.PrimaryBuildable < minBuildable Then
minBuildable = cons.PrimaryBuildable
Set primaryConstraint = cons
End If
partialConstraints.Add cons
End If
Next con
 
Top