Hello
I have some lines to try show number with percentage in textbox3 after divide textbox1/ textbox2 and multiply percentage in texbox1 to show result in textbox4
example :
textbox1=1,000.00
textbox2=8,000.00
result in textbox3 should be =12.50%
result in textbox4 should be =1,000.00 * 12.50%=125.00(warning :when multiply percentage should be 1,000.00*12.5/100 to show right result)
currently show error object required in first line .
any body help me ,please?
I have some lines to try show number with percentage in textbox3 after divide textbox1/ textbox2 and multiply percentage in texbox1 to show result in textbox4
VBA Code:
Private Sub TextBox2_AfterUpdate()
Format(TextBox3.Value, "0.00%") = CDbl(TextBox1.Value) / CDbl(TextBox2.Value)
TextBox4.Value = CDbl(TextBox1.Value) * CDbl(TextBox3.Value)
textbox1=1,000.00
textbox2=8,000.00
result in textbox3 should be =12.50%
result in textbox4 should be =1,000.00 * 12.50%=125.00(warning :when multiply percentage should be 1,000.00*12.5/100 to show right result)
currently show error object required in first line .
any body help me ,please?