ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform Text Box Formatting (https://www.excelbanter.com/excel-programming/410442-userform-text-box-formatting.html)

amit

Userform Text Box Formatting
 
Hi - I have a userform on which the Save & Close button takes the total
number and stores this back into an already open form. i hav no issues with
all this...however...i normally apply formatting on text boxes in the Change
sub.....however becos in thsi case the text box value is changed from another
userform....my change sub doesnt seem to work i also have a sum sub which i
want to run when the number from the other form is placed into this text box.

Private Sub A_Change()
Call Sum_Values
A.Value = Format(A.Value, "#,##0")
End Sub

any help would be much appreciated.

Nigel[_2_]

Userform Text Box Formatting
 
Why not just call the change sub from your update routine, you will need to
make an explicit reference to the sheet where the control is located.

--

Regards,
Nigel




"amit" wrote in message
...
Hi - I have a userform on which the Save & Close button takes the total
number and stores this back into an already open form. i hav no issues
with
all this...however...i normally apply formatting on text boxes in the
Change
sub.....however becos in thsi case the text box value is changed from
another
userform....my change sub doesnt seem to work i also have a sum sub which
i
want to run when the number from the other form is placed into this text
box.

Private Sub A_Change()
Call Sum_Values
A.Value = Format(A.Value, "#,##0")
End Sub

any help would be much appreciated.




All times are GMT +1. The time now is 01:30 AM.

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