hide when loading, reset adjust boxes, allow backspace to clear value
This commit is contained in:
parent
513e6e91b7
commit
7d0ff997c1
48
fpvt.frm
48
fpvt.frm
@ -4,7 +4,7 @@ Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} fpvt
|
||||
ClientHeight = 7260
|
||||
ClientLeft = 120
|
||||
ClientTop = 465
|
||||
ClientWidth = 17475
|
||||
ClientWidth = 7215
|
||||
OleObjectBlob = "fpvt.frx":0000
|
||||
StartUpPosition = 1 'CenterOwner
|
||||
End
|
||||
@ -65,7 +65,13 @@ End Sub
|
||||
|
||||
Private Sub butAdjust_Click()
|
||||
|
||||
Call handler.request_adjust(JsonConverter.ConvertToJson(adjust))
|
||||
Dim fail As Boolean
|
||||
|
||||
Call handler.request_adjust(JsonConverter.ConvertToJson(adjust), fail)
|
||||
If fail Then
|
||||
MsgBox ("adjustment was not made due to error")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Me.Hide
|
||||
|
||||
@ -291,6 +297,8 @@ Private Sub UserForm_Activate()
|
||||
Dim j As Long
|
||||
Dim k As Long
|
||||
Dim ok As Boolean
|
||||
|
||||
Me.mp.Visible = False
|
||||
|
||||
Set sp = handler.scenario_package("{""scenario"":" & scenario & "}", ok)
|
||||
|
||||
@ -307,6 +315,9 @@ Private Sub UserForm_Activate()
|
||||
pVal = 0
|
||||
bVol = 0
|
||||
bVal = 0
|
||||
aVol = 0
|
||||
aVal = 0
|
||||
aPrc = 0
|
||||
|
||||
For i = 1 To sp("package")("totals").Count
|
||||
Select Case sp("package")("totals")(i)("order_season")
|
||||
@ -413,6 +424,9 @@ Private Sub UserForm_Activate()
|
||||
Call handler.month_tosheet(month, basket)
|
||||
Application.StatusBar = False
|
||||
|
||||
Me.mp.Visible = True
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Sub crunch_array()
|
||||
@ -518,20 +532,20 @@ Sub load_mbox_ann()
|
||||
|
||||
load_tb = True
|
||||
|
||||
tbBaseVol = Format(bVol, "#,###")
|
||||
tbBaseVal = Format(bVal, "#,###")
|
||||
tbBaseVol = Format(bVol, "#,##0")
|
||||
tbBaseVal = Format(bVal, "#,##0")
|
||||
tbBasePrice = Format(bPrc, "0.000")
|
||||
|
||||
tbPadjVol = Format(pVol, "#,###")
|
||||
tbPadjVal = Format(pVal, "#,###")
|
||||
tbPadjVol = Format(pVol, "#,##0")
|
||||
tbPadjVal = Format(pVal, "#,##0")
|
||||
tbPadjPrice = Format(pPrc, "0.000")
|
||||
|
||||
tbFcVol = Format(fVol, "#,###")
|
||||
tbFcVal = Format(fVal, "#,###")
|
||||
If Not set_Price Then tbFcPrice = Format(fPrc, "0.###")
|
||||
tbFcVol = Format(fVol, "#,##0")
|
||||
tbFcVal = Format(fVal, "#,##0")
|
||||
If Not set_Price Then tbFcPrice = Format(fPrc, "0.000")
|
||||
|
||||
tbAdjVol = Format(aVol, "#,###")
|
||||
tbAdjVal = Format(aVal, "#,###")
|
||||
tbAdjVol = Format(aVol, "#,##0")
|
||||
tbAdjVal = Format(aVal, "#,##0")
|
||||
tbAdjPrice = Format(aPrc, "0.000")
|
||||
|
||||
load_tb = False
|
||||
@ -579,7 +593,11 @@ Sub calc_val()
|
||||
|
||||
'---------if volume adjustment method is selected, scale the volume up----------------------------------
|
||||
If opPlugVol Then
|
||||
pchange = fVal / (pVal + bVal)
|
||||
If (pVal + bVal) = 0 Then
|
||||
pchange = 0
|
||||
Else
|
||||
pchange = fVal / (pVal + bVal)
|
||||
End If
|
||||
fVol = (pVol + bVol) * pchange
|
||||
Else
|
||||
fVol = pVol + bVol
|
||||
@ -596,7 +614,7 @@ Sub calc_val()
|
||||
aPrc = 0
|
||||
|
||||
End If
|
||||
tbFcVal = Format(tbFcVal, "#,###")
|
||||
tbFcVal = Format(co_num(tbFcVal, 0), "#,##0")
|
||||
|
||||
Me.load_mbox_ann
|
||||
|
||||
@ -859,4 +877,8 @@ Function iter_def(ByVal iter As String) As String
|
||||
|
||||
End Function
|
||||
|
||||
Sub new_part()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user