elrayiss
asked on
help on error message
i got this code that when i get to put a value in room service the whole thing stop working and tell me Conversion from string "" to type 'Double' is not valid."}. my code is suppose to calculate subtotal which is telephoneChg + RoomService + Laundry my code is the follow please help
If TextBox4.Text.Length = 0 AndAlso TextBox5.Text.Length = 0 AndAlso TextBox6.Text.Length Then Exit Sub
If Not IsNumeric(TextBox4.Text) OrElse Not IsNumeric(TextBox5.Text) AndAlso TextBox6.Text.Length Then Exit Sub
dblRoomService = CDbl(TextBox5.Text)
dblTelephone = CDbl(TextBox4.Text)
dblLaundry = CDbl(TextBox6.Text)
Subtotal = dblRoomService + dblTelephone + dblLaundry
TextBox7.Text = CStr(Subtotal)
TextBox7.Text = Format(Subtotal, "$#,##0.00")
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
excellent thank you
Glad to be of assistance.
AW
AW
Open in new window