Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default textbox.caption question

Good Morning Group,

Have some problem with a presentation of values in a textbox.
The code below works fine and presents the values in a Textbox in UserForm1.
The Cells(1,1) is formated as 'number' with 2 decimals. When the value in
the cell is of the type xxxx,00 (the decimal values are zero) the Textbox
does not show this, but just xxxx. Is there a way to have the Textbox to
show these decimals even if they are zero?

Brgds

CG Rosén

n = Application.WorksheetFunction.Sum(Sheets(1).Range( Sheets(1).Cells(r, 1),
Sheets(1).Cells(r, 20)))

Worksheets(2).Cells(1, 1) = n

UserForm1.Label1.Caption = Round(Worksheets(2).Cells(1, 1), 2)


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default textbox.caption question

Try this,

UserForm1.Label1.Caption = Format(Round(Cells(1, 1), 2), "#,###.00")

Regards,
Shah Shailesh
http://members.lycos.co.uk/shahweb/


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
TextBox Question Jim Excel Discussion (Misc queries) 4 July 11th 08 10:41 PM
Textbox question browie Excel Discussion (Misc queries) 0 June 13th 05 04:00 PM
Textbox.caption to cell if empty, how? WTG Excel Worksheet Functions 1 February 27th 05 09:30 AM
Textbox.caption to cell if empty, how? WTG Excel Discussion (Misc queries) 2 February 27th 05 04:03 AM
Textbox question Jorge Rodrigues[_2_] Excel Programming 4 November 13th 04 11:08 PM


All times are GMT +1. The time now is 03:33 AM.

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

About Us

"It's about Microsoft Excel"