Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Currency Format on UserForm when opened!

The values of a text box on a UserForm appear as numbers. I want to diplay
the value of these text boxes in currency format when the form is opened.
How do I write the code to ensure currency format is always displayed?
--
Thanks,
Robo
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Currency Format on UserForm when opened!

You can use something like:

Option Explicit
Private Sub UserForm_Initialize()
Me.TextBox1.Value = Format(1234.23, "$#,##0.00")
End Sub


Robo wrote:

The values of a text box on a UserForm appear as numbers. I want to diplay
the value of these text boxes in currency format when the form is opened.
How do I write the code to ensure currency format is always displayed?
--
Thanks,
Robo


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Currency Format on UserForm when opened!

help...still unable to get the UserForm (DisbSchForm) to display currency
when opened (Show).
i have thirty txt boxes named txtbox01, txtbox02, txtbox03...txtbox30 &
& when i type in what you told me it displays only a number? i do not want
the decimal places to display & the currency amount can be up to 9 digits.
--
Thanks,
Robo


"Dave Peterson" wrote:

You can use something like:

Option Explicit
Private Sub UserForm_Initialize()
Me.TextBox1.Value = Format(1234.23, "$#,##0.00")
End Sub


Robo wrote:

The values of a text box on a UserForm appear as numbers. I want to diplay
the value of these text boxes in currency format when the form is opened.
How do I write the code to ensure currency format is always displayed?
--
Thanks,
Robo


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Currency Format on UserForm when opened!

Something like this?

Me.TextBox1.Value = Format(1234.23, "$#,##0")


Robo wrote:

help...still unable to get the UserForm (DisbSchForm) to display currency
when opened (Show).
i have thirty txt boxes named txtbox01, txtbox02, txtbox03...txtbox30 &
& when i type in what you told me it displays only a number? i do not want
the decimal places to display & the currency amount can be up to 9 digits.
--
Thanks,
Robo

"Dave Peterson" wrote:

You can use something like:

Option Explicit
Private Sub UserForm_Initialize()
Me.TextBox1.Value = Format(1234.23, "$#,##0.00")
End Sub


Robo wrote:

The values of a text box on a UserForm appear as numbers. I want to diplay
the value of these text boxes in currency format when the form is opened.
How do I write the code to ensure currency format is always displayed?
--
Thanks,
Robo


--

Dave Peterson


--

Dave Peterson
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
format userform text box Zygan Excel Discussion (Misc queries) 3 July 12th 06 03:25 PM
format cells for currency 2450 and have it format to $24.50? Karen C Excel Worksheet Functions 0 October 13th 05 03:21 PM
Change General Format to Currency Format Freshman Excel Worksheet Functions 3 July 8th 05 03:42 AM
why does currency format change to number format? Cassie Excel Discussion (Misc queries) 3 March 18th 05 06:57 PM
Can macro/userform run depending on HOW workbook is opened? grasping@straws Excel Discussion (Misc queries) 1 December 28th 04 03:19 PM


All times are GMT +1. The time now is 12:04 AM.

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"