Thanks Mark works fine, have three other similar situations -
If txtA.Value = "" Then
txtA.Value = 0
Else
txtValue = CDbl(txtA)
End If
If txtB.Value = "" Then
txtB.Value = 0
txtB.Value = CDbl(txtB)
End If
__________________________________________________ __
If txtA = 0 Then
vaData(1, 7) = Null
Else
vaData(1, 7) = txtA.Value
End If
If txtB = 0 Then
vaData(1, 8) = Null
Else
vaData(1, 8) = txtB.Value
End If
__________________________________________________ _
Private Sub txtA_Exit(ByVal Cancel As MSForms.ReturnBoolean)
ReCalc
End Sub
Private Sub txtB_Exit(ByVal Cancel As MSForms.ReturnBoolean)
ReCalc
End Sub
Private Sub txtC_Exit(ByVal Cancel As MSForms.ReturnBoolean)
ReCalc
End Sub
all cycle through a to z
any help appreciared
------------------------------------------------
~~ Message posted from
http://www.ExcelTip.com/
~~ View and post usenet messages directly from
http://www.ExcelForum.com/