Project.CurrencySymbol Property

Project Developer Reference

Returns or sets the characters that denote currency values. Read/write String.

Syntax

expression.CurrencySymbol

expression   A variable that represents a Project object.

Return Value
String

Remarks

Microsoft Office Project 2007 sets the CurrencySymbol property equal to the corresponding value in the Regional Settings icon (in Windows 98, Windows NT, or Windows Me), Regional Options icon (in Windows 2000), or Regional and Language Options icon (in Windows XP) of the Microsoft Windows Control Panel.

Example
The following example formats currency values in the active project according to the country specified by the user.

Visual Basic for Applications
  Sub FormatCurrency()
Dim Country As String

' Prompt the user to enter the name of a country.
Country = UCase(InputBox$("Enter the name of a country: ", "Format Currency By Country"))

Select Case Country
    Case "US", "United States", "USA", "United States of America"
        ActiveProject.<strong class="bterm">CurrencySymbol</strong> = "$"
        ActiveProject.CurrencySymbolPosition = pjBefore
    Case "ENGLAND"
        ActiveProject.<strong class="bterm">CurrencySymbol</strong> = Chr(163)
        ActiveProject.CurrencySymbolPosition = pjBefore
    Case "SWEDEN"
        ActiveProject.<strong class="bterm">CurrencySymbol</strong> = "kr"
        ActiveProject.CurrencySymbolPosition = pjAfterWithSpace
    ' Warn user if the currency format is not known.
    Case Else
        MsgBox ("The currency format for that country is unknown.")
End Select

End Sub

See Also