Table of contents
TOC
Recolher sumário
Expandir sumário

Propriedade Project.CurrencySymbol (projeto)Project.CurrencySymbol Property (Project)

office 365 dev account|Última Atualização: 22/03/2018
|
2 Colaboradores

Obtém ou define os caracteres que denotam valores monetários. Cadeia de caracteresde leitura/gravação.Gets or sets the characters that denote currency values. Read/write String.

SintaxeSyntax

expressão. CurrencySymbolexpression. CurrencySymbol

expressão Uma variável que representa um objeto Project .expression A variable that represents a Project object.

ComentáriosRemarks

O Project define a propriedade CurrencySymbol igual ao valor correspondente na caixa de diálogo Personalizar opções regionais do painel de controle do Windows.Project sets the CurrencySymbol property equal to the corresponding value in the Customize Regional Options dialog box of the Windows Control Panel.

ExemploExample

O exemplo a seguir formata valores monetários no projeto ativo conforme o país ou região especificada pelo usuário.The following example formats currency values in the active project according to the country or region specified by the user.

Sub FormatCurrency() 

    Dim CountryOrRegion As String 

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

    Select Case CountryOrRegion 
        Case "US", "United States", "USA", "United States of America" 
            ActiveProject.CurrencySymbol = "$" 
            ActiveProject.CurrencySymbolPosition = pjBefore 
        Case "ENGLAND" 
            ActiveProject.CurrencySymbol = Chr(163) 
            ActiveProject.CurrencySymbolPosition = pjBefore 
        Case "SWEDEN" 
            ActiveProject.CurrencySymbol = "kr" 
            ActiveProject.CurrencySymbolPosition = pjAfterWithSpace 
        ' Warn user if the currency format is not known. 
        Case Else 
            MsgBox ("The currency format for that country or region is unknown.") 
    End Select
End Sub
© 2018 Microsoft