View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
helmekki[_35_] helmekki[_35_] is offline
external usenet poster
 
Posts: 1
Default Calculation does not appear in userform


Hi

I have several Textboxs in a userform
main Textbox shows the total of the values entered into textboxs

my problem is : the total does not appear in the main Textbox untill
fill in
all other Textboxs............somtimes i want to fill in only fe
textboxes, so
the total does not appear in the Textbox that shows the total......

here is the codes i used in the userform:

PHP code
-------------------
Sub MyCalc()
If IsNumeric(tot.Text) Then
If IsNumeric(txtConsu.Text) Then
If IsNumeric(txtMaint.Text) Then
If IsNumeric(txtClea.Text) Then
If IsNumeric(carmaint.Text) Then
If IsNumeric(TransM.Text) Then
If IsNumeric(machm.Text) Then

bal.Value = CDbl(tot.Value) - (CDbl(txtConsu.Value) _
+ CDbl(txtMaint.Value) + CDbl(txtClea.Value) _
+ CDbl(carmaint.Value) + CDbl(TransM.Value) _
+ CDbl(machm.Value))
End If
End If
End If
End If
End If
End If
End If
END Sub

Private Sub tot_Change()
MyCalc
End Sub
Private Sub txtConsu_Change()
MyCalc
End Sub
Private Sub txtMaint_Change()
MyCalc
End Sub

Private Sub txtClea_Change()
MyCalc
End Sub

Private Sub carmaint_Change()
MyCalc
End Sub

Private Sub TransM_Change()
MyCalc
End Sub

Private Sub machm_Change()
MyCalc
End Su
-------------------


I highly appreciate any help ;) ;)
yours


--
helmekk

-----------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...nfo&userid=693
View this thread: http://www.excelforum.com/showthread.php?threadid=27002