I can't find a way to do this. I think it's a very basic question, but i'm just new with excel VBA and can't find the right formula.
Recently i understand that to do the sum, i have to change each of the textboxes
into integer first, then i can add it to a single textbox
, so i'm converting each value into integer while i sum them one by one to a text box.
I have tried this code.
Private Sub txtTotal_Change()
txtTotal.Value = CInt(txtKas) + CInt(txtInvestasi) + CInt(txtDanaTerbatas) + CInt(txtBruto) + ...
End Sub
How can i sum this multiple textboxes (8 textboxes) into a single textbox?
You need to add Change Events on your text boxes that are user changeable.
Lets say I have below UserForm and TextBox1 to TextBox3:

TextBox3 will be the Sum of TextBox1 and TextBox2.
Right click UserForm1 under Project and select View Code, then put in the TextBoxesSum Sub (I use Double type for accepting decimals):
To be safe and smart, you should also put in key checking from user input. Due to the amount of text boxes you have it is better to have a Function to handle it:
Now back to the UserForm1 object, right click TextBox1 and View Code, put in:
Also do checking on the KeyPress event:
Now copy above 2 set of TextBox Sub and paste below, then replace the string before underscore to match the name of the text boxes you have.
Sample output:
