ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Format & ControlSource (https://www.excelbanter.com/excel-programming/330153-format-controlsource.html)

Oskar von dem Hagen[_2_]

Format & ControlSource
 
I want a TextBox with ControlSource use the same Number-Format as the
ControlSource-cell.

Is my perception correct that there is no easy way to do this (but to write
a textbox_change procedure)?

Oskar von dem Hagen

P.S. Excel 2K, W2K SP4

Bob Phillips[_7_]

Format & ControlSource
 
This is a problem Oskar.

I tend to remove ControlSource in these cases and use the Enter event to
format it., like so

Private Sub TextBox1_Enter()
TextBox1.Text = Format(TextBox1.Text, "dd-mmm")
End Sub


--
HTH

Bob Phillips

"Oskar von dem Hagen" wrote in
message ...
I want a TextBox with ControlSource use the same Number-Format as the
ControlSource-cell.

Is my perception correct that there is no easy way to do this (but to

write
a textbox_change procedure)?

Oskar von dem Hagen

P.S. Excel 2K, W2K SP4





All times are GMT +1. The time now is 12:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com