(Msg. 1) Posted: Sun Jul 13, 2008 12:13 pm
Post subject: Decimal places in Textbox entry Add to elertz Archived from groups: microsoft>public>word>vba>userforms (more info?)
Hi
Please can you help with a problem I have with a textbox entry on a
userform.
I need the final entry in a text box to display 2 decimal places, even if
there are no decimal quantities. i.e. if user inputs 50, the text box shows
it as 50.00.
Is this possible and if so, how
(Msg. 2) Posted: Sun Jul 13, 2008 12:13 pm
Post subject: Re: Decimal places in Textbox entry Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
You can use the text box on exit event:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsNumeric(Me.TextBox1.Value) Then
Me.TextBox1.Value = Format(Me.TextBox1.Value, "0.00")
End If
End Sub
Al@n wrote:
> Hi
> Please can you help with a problem I have with a textbox entry on a
> userform.
> I need the final entry in a text box to display 2 decimal places,
> even if there are no decimal quantities. i.e. if user inputs 50, the
> text box shows it as 50.00.
> Is this possible and if so, how
>
> (Windows XP with office 2000 SR-1 standard)
>
> TIA
(Msg. 3) Posted: Sun Jul 13, 2008 9:28 pm
Post subject: Re: Decimal places in Textbox entry Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Greg
Thanks Very Much
Alan
"Gregory K. Maxey" <gmaxey.TakeThisOut@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in
message news:eu227rP5IHA.784@TK2MSFTNGP04.phx.gbl...
> You can use the text box on exit event:
>
> Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
> If IsNumeric(Me.TextBox1.Value) Then
> Me.TextBox1.Value = Format(Me.TextBox1.Value, "0.00")
> End If
> End Sub
>
>
>
>
> Al@n wrote:
>> Hi
>> Please can you help with a problem I have with a textbox entry on a
>> userform.
>> I need the final entry in a text box to display 2 decimal places,
>> even if there are no decimal quantities. i.e. if user inputs 50, the
>> text box shows it as 50.00.
>> Is this possible and if so, how
>>
>> (Windows XP with office 2000 SR-1 standard)
>>
>> TIA
>
>
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum