Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Number format of textbox in userform

Hello!

I have a userform with textboxes showing financials per month. My goal is to
show the number format "#,##0.00# for
- first entries in that textbox
- values already available in my sheet.

Currently I am using this code for the textbox

Private Sub txt_janEUR_AfterUpdate()
txt_julEUR.Text = Format(txt_julEUR.Text, "#,##0.00")
End Sub

This helps to return the format after data entry.
Now I am missing code to show the same format for data that exists already
in the table. The number format in the table is proper ("#,##0.00") but the
number in the textbox is shown without this format.

I hope there is a solution for this.

Kind regards,

Bodo Frost
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Number format of textbox in userform

Use the same line of code when you first show the UserForm.
__________________________________________________ ____________________

"Bikash" wrote in message
...
Hello!

I have a userform with textboxes showing financials per month. My goal is
to
show the number format "#,##0.00# for
- first entries in that textbox
- values already available in my sheet.

Currently I am using this code for the textbox

Private Sub txt_janEUR_AfterUpdate()
txt_julEUR.Text = Format(txt_julEUR.Text, "#,##0.00")
End Sub

This helps to return the format after data entry.
Now I am missing code to show the same format for data that exists already
in the table. The number format in the table is proper ("#,##0.00") but
the
number in the textbox is shown without this format.

I hope there is a solution for this.

Kind regards,

Bodo Frost



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Number format of textbox in userform

It is always the same textbox. Where do I put this code then?

Regards,
Bodo

"Vasant Nanavati" wrote:

Use the same line of code when you first show the UserForm.
__________________________________________________ ____________________

"Bikash" wrote in message
...
Hello!

I have a userform with textboxes showing financials per month. My goal is
to
show the number format "#,##0.00# for
- first entries in that textbox
- values already available in my sheet.

Currently I am using this code for the textbox

Private Sub txt_janEUR_AfterUpdate()
txt_julEUR.Text = Format(txt_julEUR.Text, "#,##0.00")
End Sub

This helps to return the format after data entry.
Now I am missing code to show the same format for data that exists already
in the table. The number format in the table is proper ("#,##0.00") but
the
number in the textbox is shown without this format.

I hope there is a solution for this.

Kind regards,

Bodo Frost




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Number format of textbox in userform

There must be some code which first "shows" the UserForm. Put the line of
code right after that.
__________________________________________________ ______________________


"Bikash" wrote in message
...
It is always the same textbox. Where do I put this code then?

Regards,
Bodo

"Vasant Nanavati" wrote:

Use the same line of code when you first show the UserForm.
__________________________________________________ ____________________

"Bikash" wrote in message
...
Hello!

I have a userform with textboxes showing financials per month. My goal
is
to
show the number format "#,##0.00# for
- first entries in that textbox
- values already available in my sheet.

Currently I am using this code for the textbox

Private Sub txt_janEUR_AfterUpdate()
txt_julEUR.Text = Format(txt_julEUR.Text, "#,##0.00")
End Sub

This helps to return the format after data entry.
Now I am missing code to show the same format for data that exists
already
in the table. The number format in the table is proper ("#,##0.00") but
the
number in the textbox is shown without this format.

I hope there is a solution for this.

Kind regards,

Bodo Frost






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
Date Format for Userform TextBox John Calder New Users to Excel 4 July 29th 09 10:19 PM
TextBox in UserForm with 24h time format Mika Excel Programming 1 February 1st 05 07:45 PM
format textbox in userform jeffP Excel Programming 1 January 25th 05 01:10 AM
Format of a TextBox in a userform MD Excel Programming 4 January 13th 05 05:42 PM
Qn: Date Format in TextBox in UserForm? Michael Vaughan Excel Programming 1 August 23rd 04 10:03 AM


All times are GMT +1. The time now is 10:06 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"