Ответить на сообщение
Вернуться к теме
Вы отвечаете на сообщение:
ник: Lukas Не совсем так. Создаем функцию расчета в общем модуле:
Public Function funAmountProduct(IdProduct As Long, IdStone As Long, IdInvoice As Long, IdSlabs As Long, IdProfile As Long, IdForm As Long, DimA As Long, DimB As Long, DimB1 As Long, DimC As Long, DimD As Long, DimE As Long, DimF As Long, DimG As Long, DimH As Long, R1 As Long, R2 As Long, R3 As Long, Optional Factory As Long = 1, Optional bolFactory As Boolean = False, Optional bolSplicing As Boolean = False, Optional IDInvoiceProfile As Long = 1, Optional bolUrgent As Boolean = False, Optional bolTakeStockStone As Boolean = True) As Currency On Error GoTo Err_function 'Переменные, необходимые для расчетов Dim IdTypeStone As Long Dim AmountStone As Currency Dim SpaceLine As Long Dim SpaceCurveLine As Long Dim AmountLine As Currency Dim AmountCurveLine As Currency Dim SpaceProfile As Long Dim AmountProfile As Currency Dim AmountInnerCorner As Currency Dim AmountOuterCorner As Currency Dim AmountCut As Currency Dim AmountSqrAperture As Currency Dim CountInnerCorner As Long Dim CountOuterCorner As Long Dim CountCut As Long ' здесь сами расчеты. funAmountProduct = Round((AmountStone + AmountInnerCorner + AmountOuterCorner + AmountLine + AmountCurveLine + AmountProfile + AmountSqrAperture + AmountCut), 0) Exit_function: Exit Function Err_function: MsgBox Err.Description, vbExclamation, "Калькуляция стоимости изделия" Resume Exit_function End Function
Ваше имя:
Пароль:
Сообщение:
Прикрепить:
Для вставки смайлов в текст щелкните по значку.