R
RyanH
I fill an array with 4 celled ranges. The 4th cell in the Range is a price
of a part. I then use a For...Next Loop to sum those prices. I need the
array that I indicated with ">>>>" to be two dimensional (or
..aryPartDes(35)(1,4)) because I am getting a "Subscript out of Range" on the
line indicated "ERROR>>>". I think because the current array is viewed like
this .aryPartDes(35)(4) thus it can,t find the price. Any ideas?
' NON MARKUP ITEMS
' onsite service techinician, do not mark up
If chkServicePlan Then.aryPartQty(35) = 1
Else
.aryPartDes(35) = ""
.aryPartQty(35) = 0
End If
' software, do mark up
.aryPartDes(36) = PartInfo("Software")
.aryPartQty(36) = 1
' freight charges for modules, do not mark up
.aryPartDes(37) = PartInfo("ModuleShipRate")
.aryPartQty(37) = .ModuleCount * Val(tbxQuantity)
' sum items not to be marked up
Total.NoMarkUpItems = 0
For i = 35 To UBound(aryPartQty)
If aryPartQty(i) > 0 Then
ERROR>>> Total.NoMarkUpItems = Total.NoMarkUpItems + .aryPartQty(i) *
..aryPartDes(i)(1, 4)
End If
Next i
of a part. I then use a For...Next Loop to sum those prices. I need the
array that I indicated with ">>>>" to be two dimensional (or
..aryPartDes(35)(1,4)) because I am getting a "Subscript out of Range" on the
line indicated "ERROR>>>". I think because the current array is viewed like
this .aryPartDes(35)(4) thus it can,t find the price. Any ideas?
' NON MARKUP ITEMS
' onsite service techinician, do not mark up
If chkServicePlan Then.aryPartQty(35) = 1
Else
.aryPartDes(35) = ""
.aryPartQty(35) = 0
End If
' software, do mark up
.aryPartDes(36) = PartInfo("Software")
.aryPartQty(36) = 1
' freight charges for modules, do not mark up
.aryPartDes(37) = PartInfo("ModuleShipRate")
.aryPartQty(37) = .ModuleCount * Val(tbxQuantity)
' sum items not to be marked up
Total.NoMarkUpItems = 0
For i = 35 To UBound(aryPartQty)
If aryPartQty(i) > 0 Then
ERROR>>> Total.NoMarkUpItems = Total.NoMarkUpItems + .aryPartQty(i) *
..aryPartDes(i)(1, 4)
End If
Next i