Excel - Formula in userform textbox

Asked By pkeeg on 05-Sep-07 01:12 AM
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.


Hali replied on 05-Sep-07 01:34 AM
I have this one compiled:

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

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