Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Number Format Controls on a User Form

I have a user form with text boxes that request dollar values. How can I
format the text box as currency when the user enters an amount?

Thanks in advance for any help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Number Format Controls on a User Form

Private Sub TextBox1_Exit(ByVal Cancel As _
MSForms.ReturnBoolean)
if isnumeric(Textbox1.Value) then
Textbox1.Value = Format(cdbl(Textbox1.value),"$ #,##0.00")
End If
End Sub

--
Regards,
Tom Ogilvy

"ChelseaWarren" wrote in message
...
I have a user form with text boxes that request dollar values. How can I
format the text box as currency when the user enters an amount?

Thanks in advance for any help.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Number Format Controls on a User Form

Tom -

Thanks a million!!

"Tom Ogilvy" wrote:

Private Sub TextBox1_Exit(ByVal Cancel As _
MSForms.ReturnBoolean)
if isnumeric(Textbox1.Value) then
Textbox1.Value = Format(cdbl(Textbox1.value),"$ #,##0.00")
End If
End Sub

--
Regards,
Tom Ogilvy

"ChelseaWarren" wrote in message
...
I have a user form with text boxes that request dollar values. How can I
format the text box as currency when the user enters an amount?

Thanks in advance for any help.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
User form controls add nath Excel Programming 1 May 26th 04 10:58 AM
User Form Controls Keith Willshaw Excel Programming 0 August 29th 03 01:20 PM
User Form Controls Tom Ogilvy Excel Programming 0 August 29th 03 12:42 PM
User Form Controls Zaid Qureshi Excel Programming 0 August 29th 03 12:40 PM
User Form Controls Zaid Qureshi Excel Programming 0 August 29th 03 12:40 PM


All times are GMT +1. The time now is 01:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"