does any one know how i can convert year to month.
would it be
textbox*12
so if user enters 2 then *12 = 24 months is that correct
and how would i do the coding for this
does any one know how i can convert year to month.
would it be
textbox*12
so if user enters 2 then *12 = 24 months is that correct
and how would i do the coding for this
What is it exactly that you're trying to do? Where are users entering the "2"?
If possible, please attach a small, sanitised version of your file so that we can see what you're after.
well a user will enter numbers, which maximum will be up to 30 in a text box.Originally Posted by geekgirlau
how could i make that textbox be equal to a month so examlpe if user enters 2 then that is equal to 24 months etc..
You mean that you want the textbox he enters 2 into, to change to 24 automatically? If so,
[VBA]Private Sub TextBox1_AfterUpdate()
Me.TextBox1 = Me.TextBox1.Value * 12
End Sub
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
basically there is two textbox.
textbox one is for user to enter a value and second textbox is for user to enter years.
and the output would be calculated and output would be done in monthly.
so 10*2 = 20 / 24months = 0.84
And where does the result go?
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Haven't we done this before?
[vba]
Me.TextBox3.Text = Format(CDbl(TextBox1.Text) * CDbl(TextBox2.Text) / 24, "#,##0.00")
[/vba]