ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formating Data Labels (https://www.excelbanter.com/excel-programming/294747-formating-data-labels.html)

Ian Mangelsdorf

Formating Data Labels
 
Hi all

Im trying to update the values in a data entry form. I have set up a
seies of labels and want to update tehm as in the following code. Im
having trouble with the formatting of the numbers. Can I control the
format of the caption text or do I need to use a different method??

If IsNumeric(Selection.Cells.Offset(0, 43).Value) = True Then
Pv.Caption = Selection.Cells.Offset(0, 43).Value
Pv.Caption.Text = Format("0.000")
End If

Regards

Ian

Harald Staff

Formating Data Labels
 
Hi Ian

Try
Pv.Caption = Format(Selection.Cells.Offset(0, 43).Value, "0.000")

HTH. Best wishes Harald

"Ian Mangelsdorf" skrev i melding
om...
Hi all

Im trying to update the values in a data entry form. I have set up a
seies of labels and want to update tehm as in the following code. Im
having trouble with the formatting of the numbers. Can I control the
format of the caption text or do I need to use a different method??

If IsNumeric(Selection.Cells.Offset(0, 43).Value) = True Then
Pv.Caption = Selection.Cells.Offset(0, 43).Value
Pv.Caption.Text = Format("0.000")
End If

Regards

Ian




Ian Mangelsdorf

Formating Data Labels
 


Thanks Hanrold

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT +1. The time now is 04:58 PM.

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