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

Is there a way to preserve the number format that is in a userform text box
to be the same as the formatting in the sheet source cell

For example 85% in the sheet (percent format) reads 0.85 in the text box
that reads from that cell

Can anyone help?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Preserving number format in userform textbox

You can always assign the Text property of the range to the TextBox...

TextBox1.Value = Range("A1").Text

--
Rick (MVP - Excel)


"Roger on Excel" wrote in message
...
Is there a way to preserve the number format that is in a userform text
box
to be the same as the formatting in the sheet source cell

For example 85% in the sheet (percent format) reads 0.85 in the text box
that reads from that cell

Can anyone help?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Preserving number format in userform textbox

Try

Set rng = Range("A1")
TextBox1 = Format(rng,rng.NumberFormat)

If this post helps click Yes
---------------
Jacob Skaria


"Roger on Excel" wrote:

Is there a way to preserve the number format that is in a userform text box
to be the same as the formatting in the sheet source cell

For example 85% in the sheet (percent format) reads 0.85 in the text box
that reads from that cell

Can anyone 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
Format TextBox on UserForm ryguy7272 Excel Programming 7 August 5th 07 03:46 PM
Number format of textbox in userform Bikash Excel Programming 3 June 27th 07 07:40 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 11:25 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"