Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
TextBox Question | Excel Discussion (Misc queries) | |||
Textbox question | Excel Discussion (Misc queries) | |||
Textbox.caption to cell if empty, how? | Excel Worksheet Functions | |||
Textbox.caption to cell if empty, how? | Excel Discussion (Misc queries) | |||
Textbox question | Excel Programming |