Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Userform- Formating numbers in Textboxes

Hello,
I am trying to find a way to format the numbers in a textbox which derives
the data from a excel sheet. Nothing too fancy but I can't figure it
out...any help?

Thanks,
Ozgur
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Userform- Formating numbers in Textboxes

Textbox1.Text = Format(Range("A1").Value,"$#,##0.00")

for example.

If the range is already formatted you could use

Textbox1.Text = Range("A1").Text

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Ozgur Pars" wrote in message
...
Hello,
I am trying to find a way to format the numbers in a textbox which derives
the data from a excel sheet. Nothing too fancy but I can't figure it
out...any help?

Thanks,
Ozgur



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Userform- Formating numbers in Textboxes

Hi Ozgur,

Try:

With TextBox1
. Text = Format(.Text, "##,##0.00")
End With


---
Regards,
Norman



"Ozgur Pars" wrote in message
...
Hello,
I am trying to find a way to format the numbers in a textbox which derives
the data from a excel sheet. Nothing too fancy but I can't figure it
out...any help?

Thanks,
Ozgur



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Userform- Formating numbers in Textboxes

Hi Ozgar,

With TextBox1
. Text = Format(.Text, "##,##0.00")
End With



Better, as Bob shows, to format the input data directly.


---
Regards,
Norman


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Userform- Formating numbers in Textboxes

Bob , Norman,
thanks alot for your help.

Ozgur

"Bob Phillips" wrote:

Textbox1.Text = Format(Range("A1").Value,"$#,##0.00")

for example.

If the range is already formatted you could use

Textbox1.Text = Range("A1").Text

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Ozgur Pars" wrote in message
...
Hello,
I am trying to find a way to format the numbers in a textbox which derives
the data from a excel sheet. Nothing too fancy but I can't figure it
out...any help?

Thanks,
Ozgur




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
UserForm TextBoxes Rob Excel Discussion (Misc queries) 2 August 6th 05 03:07 AM
userform & textboxes beginner Excel Programming 3 July 27th 04 10:56 AM
userform textboxes again Jo[_6_] Excel Programming 4 October 21st 03 07:25 PM
userform textboxes Jo[_6_] Excel Programming 4 October 21st 03 07:15 PM
add numbers in textboxes on userform KimberlyC Excel Programming 5 September 18th 03 06:15 AM


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"