Previous Document Next Document

Object Model Reference : Classes : D : DataItem : Properties : DataItem.FormattedValue


DataItem.FormattedValue

Property FormattedValue As String

Description

Member of DataItem

The FormattedValue property returns a string representing the value in the DataItem object. The returned string is formatted according to the data-format specification. For example, if the Cost field is set to 10, then FormattedValue returns the string $10.00 while Value returns a numeric 10.

The Name and CDRStaticID fields are read-only and cannot be modified.

The FormattedValue property returns a read-only value.

VBA example

The following VBA example shows a list of all object data items assigned to the selected shape.

Sub Test()
 Dim di As DataItem
 Dim s As String
 s = "Field = Formatted/Value" & vbCr
 For Each di In ActiveShape.ObjectData
  s = s & vbCr & di.DataField.Name & " = " & di.FormattedValue & " / " & di.Value
 Next di
 MsgBox s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.