diff --git a/fpvt.frm b/fpvt.frm index 4e56959..0ff699d 100644 --- a/fpvt.frm +++ b/fpvt.frm @@ -624,12 +624,18 @@ Sub calc_val() '---------if volume adjustment method is selected, scale the volume up---------------------------------- If opPlugVol Then - If (pVal + bVal) = 0 Then + If (Round(pVal, 2) + Round(bVal, 2)) = 0 Then pchange = 0 + If co_num(pVal, bVal) = 0 Then + MsgBox ("a new part was added, and then adjusted to -0-") + Else + fVol = fVal / (co_num(bVal, pVal) / co_num(bVol, pVol)) + End If Else pchange = fVal / (pVal + bVal) + fVol = (pVol + bVol) * pchange End If - fVol = (pVol + bVol) * pchange + Else fVol = pVol + bVol End If @@ -660,6 +666,7 @@ Sub calc_val() If opPlugVol Then adjust("type") = "scale_v" adjust("amount") = aVal + adjust("qty") = aVol Else adjust("type") = "scale_p" adjust("amount") = aVal diff --git a/fpvt.frx b/fpvt.frx index 2336bd4..d7f4656 100644 Binary files a/fpvt.frx and b/fpvt.frx differ diff --git a/months.cls b/months.cls index 1878742..282c1fa 100644 --- a/months.cls +++ b/months.cls @@ -161,7 +161,7 @@ On Error GoTo errh Dim i As Integer Call Me.get_sheet Dim vp As String - vp = Sheets("month").Range("R2") + vp = Sheets("month").Range("Q2") For i = 1 To 12 If sales(i, 5) = "" Then sales(i, 5) = 0