Formula in userform textbox

G

Guest

I want to split a transaction using a userform. The user enters the total
amount in a textbox control and then splits the amount into several
components in other textbox controls. A further textbox control then
calculates that the sum of the splits equals the original total amount. The
results are posted to the original spreadsheet using VBE. Can I do this with
textbox controls in a userform? If so how do I construct the formulas? Can I
format the control for finance? I know I can do it with a spreadsheet control
in the form, but I am having memory trouble and every time I use the command
button to show the control there is a warning about security.

Regards
 
G

Guest

I have this one compiled:

Private Sub TextBox1_Change()
If IsNumeric(TextBox1) Then
TextBox2 = TextBox1 * 0.1
Else
TextBox2 = ""
End If
End Sub

'Add TextBox1 and TextBox2 in a userform for test.
' then paste code above behind userform.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top