G
Guest
In PowerPoint I used the Format() function to format a number. Unknown to me
at the time the reference library Microsoft Windows CommonControls-26.0 (SP4)
is not available (missing) on most other computers. I do not want the users
of the presentation to have to download the library either. Unless there is
a way to package and install it automatically which due to my lack of
knowledge seems a bit too complex.
So, instead of re-inventing the wheel I was hoping that I can find some code
that I could modify for my use.
This is what I am trying to do:
User inputs a number:
2500
PPT VBA code formats it to:
$2,500.00
This was the code I used before
Private Sub txtBx_value_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
txtBx_value.Text = Format(txtBx_value.Text, "$ #,##0.00")
End Sub
My logic is to write code that counts the number of characters (places) in
the number using Len() then loop through looking for the decimal point,
commas if entered etc. and place the commas, decimal point and commas in the
appropriate place.
Thanks in advance for any help you offer…
at the time the reference library Microsoft Windows CommonControls-26.0 (SP4)
is not available (missing) on most other computers. I do not want the users
of the presentation to have to download the library either. Unless there is
a way to package and install it automatically which due to my lack of
knowledge seems a bit too complex.
So, instead of re-inventing the wheel I was hoping that I can find some code
that I could modify for my use.
This is what I am trying to do:
User inputs a number:
2500
PPT VBA code formats it to:
$2,500.00
This was the code I used before
Private Sub txtBx_value_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
txtBx_value.Text = Format(txtBx_value.Text, "$ #,##0.00")
End Sub
My logic is to write code that counts the number of characters (places) in
the number using Len() then loop through looking for the decimal point,
commas if entered etc. and place the commas, decimal point and commas in the
appropriate place.
Thanks in advance for any help you offer…