Showing values as currency in a form


Posted by David McArthur on July 24, 2001 4:20 PM

I have created a form using VB editor. The text boxes on this form show numbers and currency from an excel sheet. The cells in the sheet have been formatted correctly (currency and numbers, each with 2 decimal places.) When I call up the form, it doesnt show the $ in front of the currency nor the 2 decimal places and the numerics do not show the 2 decimal places either.
I can band aid it by using a before and after event procedure and using the appropriate FORMAT statement, so when I alter the values they show in the correct format.What I would like is that the form shows the correct formats on opening of the form.
Thanks for your help.



Posted by Ivan F Moala on July 25, 2001 2:19 AM

David
By default Excel97 Userform textboxs show with no
formating.....you could try change the format when
initializing the form eg.

UserForm_Initialize()
Textbox1.value = Format(textbox1.Value,Format"yourformat")

etc

Ivan