[COLOR="Navy"]Sub[/COLOR] tot()
[COLOR="Navy"]Dim[/COLOR] ctrl [COLOR="Navy"]As[/COLOR] Control
[COLOR="Navy"]Dim[/COLOR] P1 [COLOR="Navy"]As[/COLOR] Double, P2 [COLOR="Navy"]As[/COLOR] Double
TextBox1 = "": TextBox2 = ""
P1 = 0: P2 = 0
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] ctrl [COLOR="Navy"]In[/COLOR] Controls
[COLOR="Navy"]If[/COLOR] TypeName(ctrl) = "CheckBox" [COLOR="Navy"]Then[/COLOR]
[COLOR="Navy"]If[/COLOR] ctrl.Parent.Name = "Page1" And ctrl = True [COLOR="Navy"]Then[/COLOR]
P1 = P1 + Val(Mid(Split(ctrl.Caption, " ")(1), 2))
[COLOR="Navy"]ElseIf[/COLOR] ctrl.Parent.Name = "Page2" And ctrl = True [COLOR="Navy"]Then[/COLOR]
P2 = P2 + Val(Mid(Split(ctrl.Caption, " ")(1), 2))
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]Next[/COLOR] ctrl
[COLOR="Navy"]If[/COLOR] Me.MultiPage1.Value = 0 [COLOR="Navy"]Then[/COLOR]
TextBox1.Value = Format(P1, "$0.0")
[COLOR="Navy"]Else[/COLOR]
TextBox2.Value = Format(P2, "$0.0")
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Private [COLOR="Navy"]Sub[/COLOR] CheckBox1_Click()
tot
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Private [COLOR="Navy"]Sub[/COLOR] CheckBox2_Click()
tot
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Private [COLOR="Navy"]Sub[/COLOR] CheckBox3_Click()
tot
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Private [COLOR="Navy"]Sub[/COLOR] CheckBox4_Click()
tot
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Private [COLOR="Navy"]Sub[/COLOR] CheckBox5_Click()
tot
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Private [COLOR="Navy"]Sub[/COLOR] CheckBox6_Click()
tot
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Private [COLOR="Navy"]Sub[/COLOR] CheckBox7_Click()
tot
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Private [COLOR="Navy"]Sub[/COLOR] CheckBox8_Click()
tot
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]