Now, no matter what I enter, I get the msgbox "Allocation entries must equal 100%." - even if they DO equal 100%!!! Please help!


'format percentage boxes
Private Sub Allocation1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
    If Allocation1.Text <> "" Then
        Me.Allocation1.Value = Format(Me.Allocation1 / 100, "0.00%")
    End If
    On Error Resume Next
End Sub
'format percentage boxes
Private Sub Allocation2_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
    If Allocation2.Text <> "" Then
        Me.Allocation2.Value = Format(Me.Allocation2 / 100, "0.00%")
    End If
    On Error Resume Next
End Sub
'format percentage boxes
Private Sub Allocation3_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
    If Allocation3.Text <> "" Then
        Me.Allocation3.Value = Format(Me.Allocation3 / 100, "0.00%")
    End If
    On Error Resume Next
End Sub
'format percentage boxes
Private Sub Allocation4_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
    If Allocation4.Text <> "" Then
        Me.Allocation4.Value = Format(Me.Allocation4 / 100, "0.00%")
    End If
    On Error Resume Next
End Sub
'format percentage boxes
Private Sub Allocation5_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
    If Allocation5.Text <> "" Then
        Me.Allocation5.Value = Format(Me.Allocation5 / 100, "0.00%")
    End If
    On Error Resume Next
End Sub

Private Sub EnterButton_Click()
With Worksheets("INVOICES")

    Dim A As Integer
    Dim B As Integer
    Dim C As Integer
    Dim D As Integer
    Dim E As Integer

If Allocation1.Value <> "" Then
A = Format(Me.Allocation1.Value, "0.00")
End If

If Allocation2.Value <> "" Then
B = Format(Me.Allocation2.Value, "0.00")
End If

If Allocation3.Value <> "" Then
C = Format(Me.Allocation3.Value, "0.00")
End If

If Allocation4.Value <> "" Then
D = Format(Me.Allocation4.Value, "0.00")
End If

If Allocation5.Value <> "" Then
E = Format(Me.Allocation5.Value, "0.00")
End If

If A + B + C + D + E <> 100 Then
    MsgBox "Allocation entries must total 100%."
    Exit Sub
End If