Option Explicit
Public WithEvents txt As MSForms.TextBox, i As Byte
Private Sub txt_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If InStr("0123456789.", Chr(KeyAscii)) = 0 Then KeyAscii = 0
End Sub
Private Sub txt_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
For i = 1 To 10
If UserForm1.Controls("Textbox" & (i)).Value <> "" Then txt = Format(txt, "0.00")
next
End Sub