Tuesday, December 8, 2009

Convert Decimal to Percentage using VBA FormatPercent Function

Sub Convert_Decimal2Percentage()

Dim dblSuccess As Double
Dim sSuccess As String

dblSuccess = 0.456345

sSuccess = FormatPercent(dblSuccess, 2)

sSuccess = Format(Expression:=dblSuccess, Format:="Percent")

End Sub

No comments: