I have four textbox's that have a numeric value each one gets totaled and then needs to be shown on the user form as well as being inputted into the spreadsheet.
my problem is is intnum4 is blank or zero I get an error. apparently it needs something in intnum4. But what if it's blank? this is my problem and it can't only happen to int num4 but to intnum2 and intnum 3 as well . can anybody assist me please.
Dim STRTOTAL As String Dim INTNUM1 As Integer Dim INTNUM2 As Integer Dim intNUM3 As Integer Dim intNUM4, INTANSWER As Integer STRTOTAL = Me.txttotal.Value INTNUM1 = txtamt1.Value INTNUM2 = txtamt2.Value intNUM3 = txtamt3.Value intNUM4 = txtamt4.Value If STRTOTAL = "" Then INTANSWER = INTNUM1 + INTNUM2 + intNUM3 + intNUM4 Me.txttotal.Value = " SUM; " & INTANSWER End If


MultiQuote
