VBA “Application defined or object defined error ”

2019-09-17 15:43发布

I tried to use the excel formula sum in VBA and always got this error "Application-defined or object defined error". I used the same one in my other module and it works.

For nCol = 4 To 15
  Worksheets("Per individual Per Month").Cells(RowMark, nCol) = Application.Sum(Range(Worksheets("Resource Allocation Schedule").Cells(RowMark + 7, ColStart), Worksheets("Resource Allocation Schedule").Cells(RowMark + 7, ColEnd)))
  ColStart = ColStart + ColCount
  ColEnd = ColEnd + ColCount
Next nCol

标签: excel vba
0条回答
登录 后发表回答