I am building an userform That has 5 textboxes that will have pricing in them which I have VBA already set up as follows
TextBox1 (price) + Textbox2 (deposit) = TextBox3 (Subtotal)
Which I'm not sure if this is right but TextBox3 (subtotal) and Textbox 5 (Grand total) are the same unless TextBox4 (insurance) has data entered and then it would be
TextBox 3 (Subtotal) + Textbox4 (insurance) = TextBox5 (Grand total)
That is not where the problem lies though. I added a checkbox to calculate tax and that part works, but I cannot for the life of me to get it to revert back to the original state when it unchecked. The code I have inserted is as follows
We all know what is happening on uncheck it just literally adds the numbers in the 2 textboxes together But I have tried everything I can think of and I have yet to figure it out... That is when I turn to you guys.. I am hoping someone can help.. I try not to use the forums too much but in this case I cannot finish the project without your help!!
Thanks in advance for the help and I hope this is easily understandable
TextBox1 (price) + Textbox2 (deposit) = TextBox3 (Subtotal)
Which I'm not sure if this is right but TextBox3 (subtotal) and Textbox 5 (Grand total) are the same unless TextBox4 (insurance) has data entered and then it would be
TextBox 3 (Subtotal) + Textbox4 (insurance) = TextBox5 (Grand total)
That is not where the problem lies though. I added a checkbox to calculate tax and that part works, but I cannot for the life of me to get it to revert back to the original state when it unchecked. The code I have inserted is as follows
Code:
Private Sub CheckBox1_Click()If CheckBox1 = True Then
Cost.Value = Cost.Value * 1.088
End If
If CheckBox1 = False Then
Cost.Text = Subtotal.Value + Insurance.Value
End If
End Sub
We all know what is happening on uncheck it just literally adds the numbers in the 2 textboxes together But I have tried everything I can think of and I have yet to figure it out... That is when I turn to you guys.. I am hoping someone can help.. I try not to use the forums too much but in this case I cannot finish the project without your help!!
Thanks in advance for the help and I hope this is easily understandable