Жалуется на пред-предпоследнюю строчку Code: Public Function AddObjectWork(Reference As String, Optional Index As Integer = 0) As Integer Dim Count As Integer AddObjectWork = Index If ObjectWorkMax < Index Then ObjectWorkMax = Index ReDim Preserve ObjectWork(ObjectWorkMax) As ObjectsWork ElseIf Index = 0 Then For AddObjectWork = 1 To ObjectWorkMax If ObjectWork(AddObjectWork).Reference = 0 Then Exit For If AddObjectWork = ObjectWorkMax Then AddObjectWork = AddObjectWork + 1 ObjectWorkMax = AddObjectWork ReDim Preserve ObjectWork(ObjectWorkMax) As ObjectsWork Exit For End If Next End If ObjectWork(AddObjectWork).Reference = GetObjectScriptIndex(Reference) If ObjectScript(ObjectWork(AddObjectWork).Reference).Amountable Then ObjectWork(AddObjectWork).Amount = 1 End Function Как исправить ? Строчка на которую жалуется Code: If ObjectScript(ObjectWork(AddObjectWork).Reference).Amountable Then ObjectWork(AddObjectWork).Amount = 1