ListFieldCurrency Object


Contains information about the field type used to view currency information within the list. The ListFieldCurrency object allows you to view information about different currency types within the currency field of the list.
This object is supported only by Web pages or sites that are based on Microsoft SharePoint Services.
Using the ListFieldCurrency object
Use ListFields.Item (index), where index is the name or ordinal position of a field of type fpListFieldCurrency, to return a single ListFieldCurrency object.
Use the ListFields.Add method to add a field of type fpFieldCurrency to the ListFields collection. The following example adds a new field named NewCurrencyField of type fpFieldCurrency to the ListFields collection and changes the currency type to display Canadian dollars.
Sub CreateCurrencyField()
'Add new Currency field
Dim objApp As FrontPage.Application
Dim objLstFlds As ListFields
Dim objFldChoice As ListFieldCurrency
Dim strName As String
Set objApp = FrontPage.Application
Set objLstFlds = objApp.ActiveWeb.Lists.Item(0).Fields
strName = "NewCurrencyField"
'Add new Field of type fpFieldCurrency to list
objLstFlds.Add Name:=strName, Description:="New Currency Field", _
Fieldtype:=fpFieldCurrency, Required:=True
Set objFldChoice = objLstFlds.Item("NewCurrencyField")
'Change currency type to Canadian
objFldChoice.Currency = fpCurrencyFieldCanada
MsgBox "A new Field named " & strName & " was added to the list " & _
objApp.ActiveWeb.Lists.Item(0).Name & "."
End Sub