![]() |
How to get desired format in textbox linked to a cell
I have a textbox linked to a cell via its controlsource property. The
cell's format is numeric with two decimals. If the value in the cell is 7, the cell shows "7.00" but the text box shows "7" How can I make the textbox show "7.00"? Thanks. |
How to get desired format in textbox linked to a cell
Format it
TextBox1.Text = Format(TextBox1.Text,"0.00") -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) wrote in message ... I have a textbox linked to a cell via its controlsource property. The cell's format is numeric with two decimals. If the value in the cell is 7, the cell shows "7.00" but the text box shows "7" How can I make the textbox show "7.00"? Thanks. |
How to get desired format in textbox linked to a cell
Thnks for the reply. I tried doing that just after after the textbox's
controlsource was set and immediately before the form was shown and it does not work. If the user changes the content of the textbox, I can format it in a TextBox_Exit routine and it works fine, but that still leaves the initial display incorrect. On Wed, 14 Jan 2004 10:43:10 -0000, "Bob Phillips" wrote: Format it TextBox1.Text = Format(TextBox1.Text,"0.00") |
How to get desired format in textbox linked to a cell
Try it in the Userform_Activate() event.
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) wrote in message ... Thnks for the reply. I tried doing that just after after the textbox's controlsource was set and immediately before the form was shown and it does not work. If the user changes the content of the textbox, I can format it in a TextBox_Exit routine and it works fine, but that still leaves the initial display incorrect. On Wed, 14 Jan 2004 10:43:10 -0000, "Bob Phillips" wrote: Format it TextBox1.Text = Format(TextBox1.Text,"0.00") |
All times are GMT +1. The time now is 08:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com