I think that having the function check your invoice amounts and then returning a value would be better. Something like this:
Exit SubCode:Function CheckData() as Boolean CheckData = (Textbox1.Value = Textbox2.Value + Textbox3.Value + Textbox3.Value + Textbox4.Value) End Function
In the procedure where you will be sending the data to the sheet, put something like this:
If Not CheckData Then
MsgBox ("Please check your input, account s and invoice don't match!")
Hope this helps,
p.s. - I just noticed that you are adding TextBox3 twice in your example...which I copied for my example.
[ This Message was edited by: Russell Hauf on 2002-03-28 12:59 ]