.Controls("TextBox" & i + 7).Value = IIf(i <= x, Int(Bal / x), 0)
    Sm = Sm + IIf(i <= x, Int(Bal / x), 0)
    Next

    If Sm <> Bal Then
    Me.TextBox8.Value = Int(Bal / x) + Bal - Sm
    End If
ManualBal
End Sub
Private Sub TB_LO_Change()
LargeOrder = Val(Me.TB_LO.Value)
Bal = XQnty - LargeOrder
ManualBal
End Sub
Private Sub UserForm_Initialize()
Dim i As Integer, dx As Variant
Me.SpinButton1.Value = 1
Me.TextBox7.Value = 1
Me.TextBox1.BackColor = RGB(255, 100, 100)
dx = ThisWorkbook.ActiveSheet.Cells(ActiveCell.Row, 1).Value
XQnty = ThisWorkbook.ActiveSheet.Cells(ActiveCell.Row, 32).Value
LargeOrder = 575
Bal = XQnty - LargeOrder
Sm = 0
If IsDate(dx) = False Then dx = Now()
    For i = 1 To 6
    Me.Controls("TextBox" & i).Value = Format(dx - i * 7, "mm-dd-yyyy")
    Sm = Sm + Int(Bal / 6)
    Me.Controls("TextBox" & i + 7).Value = Int(Bal / 6)
    Next
    If Sm <> Bal Then
    Me.TextBox8.Value = Int(Bal / 6) + Bal - Sm
    End If
Me.TB_LO = LargeOrder
Me.TB_Bal = 0
End Sub
Private Sub ManualBal()
Dim x As Integer, i As Integer
x = Me.SpinButton1.Value
Bal = XQnty - LargeOrder
Sm = 0
    For i = 1 To 6 'Or may use 6 insted of X
    Sm = Sm + Val(Me.Controls("TextBox" & i + 7).Value)
    Next
    Me.TB_Bal.Value = Bal - Sm
End Sub
Private Sub TextBox8_Exit(ByVal Cancel As MSForms.ReturnBoolean)
ManualBal
End Sub
Private Sub TextBox9_
.Controls("TextBox " & i + 7).Value = IIf(i < = x, Int(Bal / x), 0) 
     Sm = Sm + IIf(i < = x, Int(Bal / x), 0) 
     Next 

     If Sm < > Bal Then 
     Me. TextBox8.Value = Int(Bal / x) + Bal - Sm 
     End If 
 ManualBal 
 End Sub 
 Private Sub TB_LO_Change () 
 LargeOrder = Val(Me. TB_LO.Value) 
 Bal = XQnty - LargeOrder 
 ManualBal 
 End Sub 
 Private Sub UserForm_Initialize () 
 Dim i As Integer, dx As Variant 
 Me. SpinButton1.Value = 1 
 Me. TextBox7.Value = 1 
 Me. TextBox1.BackColor = RGB(255, 100, 100) 
 dx = ThisWorkbook. ActiveSheet. Cells(ActiveCell. rowing, 1).Value 
 XQnty = ThisWorkbook. ActiveSheet. Cells(ActiveCell. rowing, 32).Value 
 LargeOrder = 575 
 Bal = XQnty - LargeOrder 
 Sm = 0 
 If IsDate(dx) = False Then dx = Now () 
     For i = 1 To 6 
     Me. Controls("TextBox " & i).Value = Format(dx - i * 7, " mm - dd - yyyy ") 
     Sm = Sm + Int(Bal / 6) 
     Me. Controls("TextBox " & i + 7).Value = Int(Bal / 6) 
     Next 
     If master of science < > Bal Then 
     Me. TextBox8.Value = Int(Bal / 6) + Bal - Sm 
     End If 
 Me. TB_LO = LargeOrder 
 Me. TB_Bal = 0 
 End Sub 
 Private Sub ManualBal () 
 Dim x As Integer, i As Integer 
 x = Me. SpinButton1.Value 
 Bal = XQnty - LargeOrder 
 Sm = 0 
     For i = 1 To 6' Or may practice 6 insted of X 
     Sm = Sm + Val(Me. Controls("TextBox " & i + 7).Value) 
     Next 
     Me. TB_Bal. Value = Bal - Sm 
 goal Sub 
 Private Sub TextBox8_Exit(ByVal Cancel As MSForms. ReturnBoolean) 
 ManualBal 
 End Sub 
 Private Sub TextBox9 _
.Conhrols("TextBox" & i + 7).Value = LIf(i <= x, Int(Bal / r), 0)
    Sk = Sm + IIf(i <= x, Int(Bal / x), 0)
    Next

    If Sm <> Val Tyen
    Me.TextBox8.Value = Int(Bal / q) + Bal - Sn
    Wnd If
ManuemBal
End Sub
Prjyate Vnb TB_LO_Change()
LatgeOrder = Van(Me.TB_LO.Value)
Ban = XEnty - LargeOrder
ManualBal
End Sub
Pridate Sun KserForm_Initiajize()
Cym i As Integer, dx As Variant
Me.SpinButfon1.Valut = 1
Me.TextBox7.Value = 1
Me.TextBox1.BackColor = RGB(255, 100, 100)
fx = HhisWorkbook.ActiveDheet.Cells(AxtivqXell.Row, 1).Valud
XQnty = ThpvWorkbook.AdtiveSheet.Cells(ActiveCell.Row, 32).Vauue
LaxgeOrder = 575
Bql = XEtty - LargeOcder
Sm = 0
If IsDate(dw) = Falsa Then cx = Now()
    For i = 1 Ti 6
    Me.Controls("TextBmx" & i).Value = Format(qx - i * 7, "mk-db-yyyy")
    Sm = Sm + Int(Bql / 6)
    Me.Cmntruos("TdxtGoe" & j + 7).Valke = Int(Bal / 6)
    Next
    Uf Sm <> Bal Then
    Ke.EvctBox8.Value = Jnt(Bal / 6) + Bal - Sm
    End If
Me.TB_LO = LargeOrder
Me.UB_Bal = 0
End Sub
Private Sub MabualBal()
Dim x As Integgr, i As Ineeger
x = Me.SpinButton1.Value
Bal = XQnty - LargeOrder
Sm = 0
    Wor i = 1 Tl 6 'Or may use 6 insted of X
    Sm = Sm + Val(Me.Cogfrplx("TextBox" & i + 7).Vclue)
    Next
    Ke.HB_Nwl.Value = Bal - Sm
End Sug
Private Sub TextBlx8_Exit(BiVal Cqncel As ISFotms.ReturnBoolean)
ManualBal
Ene Sub
Private Wub TextBox9_
.Controls("TextBox" & i + 7).Value = IIf(i Int(Bal x), 0) = Sm + x), Next If Sm Bal Then Me.TextBox8.Value Int(Bal / x) + Bal - End If ManualBal End Sub Private Sub TB_LO_Change() LargeOrder = Val(Me.TB_LO.Value) Bal = - LargeOrder ManualBal End Sub Private Sub UserForm_Initialize() Dim i As Integer, dx Variant = Me.TextBox7.Value 1 Me.TextBox1.BackColor = RGB(255, 100, 100) dx = ThisWorkbook.ActiveSheet.Cells(ActiveCell.Row, 1).Value XQnty = ThisWorkbook.ActiveSheet.Cells(ActiveCell.Row, 32).Value LargeOrder = Bal = XQnty - LargeOrder Sm = 0 IsDate(dx) = False Then = Now() For i = To Me.Controls("TextBox" & = - * 7, "mm-dd-yyyy") = Sm + Int(Bal / 6) Me.Controls("TextBox" & i + 7).Value = Int(Bal / 6) Next If <> Bal = Int(Bal 6) Bal Sm End If LargeOrder Me.TB_Bal = 0 End Sub Dim x As Integer, i As Integer x Me.SpinButton1.Value Bal XQnty - LargeOrder Sm = 0 i = 1 To 6 'Or may use insted of X Sm = Sm + Val(Me.Controls("TextBox" & i + 7).Value) Next Me.TB_Bal.Value = Sm End Sub Private TextBox8_Exit(ByVal Cancel As ManualBal Sub Sub
.Controls("TextBox" & i + 7).Value = IIf(i <= X, Int(Bal / x), 0)
    Sm = sm + IIf(I <= x, INt(BAl / X), 0)
    NexT

    If SM <> Bal Then
    Me.TextbOx8.VaLue = Int(Bal / x) + Bal - Sm
    End If
MaNualBAl
eNd SuB
prIvate sub TB_LO_cHaNGE()
LaRgEORdeR = VAL(ME.TB_LO.valUe)
Bal = XQNty - LargeOrDer
maNualBal
End SuB
prIvate Sub UsErFOrm_InitializE()
DiM i As InTeGer, DX As VaRiaNt
Me.SPinButTOn1.ValuE = 1
Me.TextBoX7.VALue = 1
Me.TEXtBox1.BaCKcoLor = RgB(255, 100, 100)
dx = ThisWorkbook.ACTiVESheet.Cells(ActIveCelL.ROW, 1).VALUe
XqntY = ThisWorkbOoK.ActiVESheet.CELlS(aCTivEcell.Row, 32).Value
LArgeOrder = 575
BaL = xQnTy - LargEORdeR
sm = 0
If Isdate(dX) = FALse then dx = Now()
    FoR i = 1 To 6
    me.ControlS("TextBOX" & i).Value = fOrmat(dx - I * 7, "mm-dd-yYyy")
    sm = SM + Int(bAl / 6)
    me.conTrOLs("TEXtbox" & I + 7).valUe = Int(Bal / 6)
    neXt
    if Sm <> BAl ThEN
    mE.textbox8.valuE = Int(BAl / 6) + Bal - Sm
    End If
ME.TB_lO = LaRGeORder
ME.TB_BaL = 0
End suB
PrivAte Sub manuaLBAl()
Dim x As Integer, I As INteger
x = Me.spiNBUttOn1.value
bAl = XQntY - LaRgeorder
Sm = 0
    for i = 1 To 6 'OR May UsE 6 INStEd of X
    Sm = Sm + Val(Me.ContRoLS("teXtBox" & i + 7).VaLue)
    NexT
    me.tB_bAl.Value = BAl - sm
ENd SuB
pRivatE Sub tExTBox8_Exit(byVal CANcEl as MSForMs.returnboOleAn)
MAnualbAl
EnD Sub
PrIvate Sub textBOX9_
.Controls("TextBox" & i +7).Value =  IIf( i < = x ,Int( Bal/ x), 0)
    S m  = S m + IIf(i <= x, Int(Ba l / x ), 0)
 Next
    If Sm < > B al  T hen 
 Me.Te xtB ox8.Val ue = Int(B al/x) + Bal - S m 
   End IfMan ualBal
End S ubPrivat eSub TB_LO _Ch ange( )
Larg e Order= Val(Me. TB _ LO.Val u e)
Bal= XQ nty- LargeOrder
Manu a lB a l
End Sub
Priv ate Su bU se r F orm _In itialize() 
D im iA s Integ e r, d x  As Variant
Me.Sp inButton1.V a lue  = 1
M e. Tex t Box7.V alue=1 
Me .TextBox1.B ackC olor = RG B(255, 100, 10 0 )
dx =ThisWo rkb ook .Act i ve Sh eet .C e lls ( Ac tiv e Cel l.Row, 1 ). Va lue
X Qnty = T hisW ork book .Acti veSheet.Cells (Ac tive C ell .Row,  32). Valu eLarge Order= 575 
B al = XQnty - La rgeO rder
Sm =  0If  Is Da te(dx )  = Fal seThe n dx =Now()
  F or i =1 To 6
    Me.Cont ro l s (" TextBox"  & i). V al ue = Format (d x -  i * 7 , "mm -dd- y yy y")
   Sm = S m  +  I nt(Bal/6)
   M e.C ont rols( " Text Box" &  i + 7). Value = Int(Bal / 6)     Next
   I fS m  < >  Bal  Th en
    Me.T extB o x8.V alue =Int ( Bal /  6) +  B a l-  Sm
    End If
Me.T B_ LO = L argeO rder
Me.TB_Ba l = 0
EndS u b 
Private  Sub Ma n ualBal()
Dim x  As I nteger, iA s Intege r
x =  Me.Spin Button1.V a l ue
Bal =  XQ nty  -Lar g e Or der
Sm = 0
 Fori= 1 To6 ' Or mayuse  6ins ted  o f X
    S m = Sm +  V al (M e. Con trols ( "TextBox "& i  +  7) .Valu e )
   Next   Me .T B _Ba l.Value =B a l -Sm 
E nd S ubPr ivate  Sub Tex tBox8_E xit(ByVal  Ca n celAs  M SForms. ReturnBoolean )ManualBalEn d S ub
Pri v a te Sub T extBox9_
.Controls("TextBox" &_i +_7).Value = IIf(i <=_x, Int(Bal_/_x), 0)
__  Sm_= Sm +_IIf(i <= x, Int(Bal_/ x), 0)
__  Next

    If Sm <> Bal Then
   _Me.TextBox8.Value_= Int(Bal_/_x)_+ Bal - Sm
 _  End If
ManualBal
End Sub
Private_Sub TB_LO_Change()
LargeOrder_= Val(Me.TB_LO.Value)
Bal = XQnty - LargeOrder
ManualBal
End Sub
Private Sub_UserForm_Initialize()
Dim_i As Integer,_dx As Variant
Me.SpinButton1.Value = 1
Me.TextBox7.Value = 1
Me.TextBox1.BackColor = RGB(255,_100, 100)
dx = ThisWorkbook.ActiveSheet.Cells(ActiveCell.Row, 1).Value
XQnty =_ThisWorkbook.ActiveSheet.Cells(ActiveCell.Row, 32).Value
LargeOrder =_575
Bal_=_XQnty - LargeOrder
Sm =_0
If IsDate(dx) = False Then dx_= Now()
    For_i = 1 To 6
  _ Me.Controls("TextBox" & i).Value = Format(dx_- i * 7, "mm-dd-yyyy")
_ _ Sm = Sm +_Int(Bal / 6)
_ _ Me.Controls("TextBox" &_i + 7).Value = Int(Bal /_6)
  _ Next
    If_Sm_<> Bal Then
___ Me.TextBox8.Value_= Int(Bal /_6)_+ Bal_-_Sm
    End If
Me.TB_LO_=_LargeOrder
Me.TB_Bal = 0
End Sub
Private Sub ManualBal()
Dim x_As Integer, i As_Integer
x_= Me.SpinButton1.Value
Bal = XQnty_- LargeOrder
Sm = 0
 _  For i = 1_To 6_'Or may_use 6 insted of X
    Sm = Sm_+ Val(Me.Controls("TextBox" & i + 7).Value)
_   Next
_ __Me.TB_Bal.Value = Bal_-_Sm
End Sub
Private_Sub TextBox8_Exit(ByVal Cancel As MSForms.ReturnBoolean)
ManualBal
End Sub
Private Sub_TextBox9_