Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi! I have a userform attached to a macro. when the macro runs the user can
see how much of the process has been made. I show this in percentage form. However I do not know how to adjust the number of decimals so now it looks like this: Completion: 11,23652357754356%. Needless to say it does not look good. Can anyone help me with this please? Here I calculate the percentage: .Caption2 = "Process completion: " & CStr((pos / lngListLength)) * 100 & " % " and in a class module i set properties: Property Let Caption2(strCaption As String) frmProgress.lblMsg2.Caption = strCaption DoEvents End Property please help me! any help appreciated! thanks alot |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
demo'd from the immediate window:
pos = 20 ListLength = 194 ? pos/Listlength 0.103092783505155 ? format(pos / ListLength,"0.0%") 10.3% -- Regards, Tom Ogilvy "Arne Hegefors" wrote: Hi! I have a userform attached to a macro. when the macro runs the user can see how much of the process has been made. I show this in percentage form. However I do not know how to adjust the number of decimals so now it looks like this: Completion: 11,23652357754356%. Needless to say it does not look good. Can anyone help me with this please? Here I calculate the percentage: .Caption2 = "Process completion: " & CStr((pos / lngListLength)) * 100 & " % " and in a class module i set properties: Property Let Caption2(strCaption As String) frmProgress.lblMsg2.Caption = strCaption DoEvents End Property please help me! any help appreciated! thanks alot |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Omitting the whole number when formatting decimals | Excel Discussion (Misc queries) | |||
Whole Number and Decimals | Excel Discussion (Misc queries) | |||
How do I show only the whole number w/o eliminating four decimals? | Excel Worksheet Functions | |||
Displaying decimals that go in to a given number | Excel Discussion (Misc queries) | |||
How do I change the number format for decimals from , to .? | Setting up and Configuration of Excel |