Sets Essbase currency information for the specified worksheet.
EssVSetCurrency(sheetName, currencyIdentifier) ByVal sheetName As Variant ByVal currencyIdentifier As Variant
Text name of worksheet to operate on. sheetName is of the form "[Book.xls]Sheet". If sheetName is Null or Empty, the active worksheet is used.
CurName->CurTime->CurCategory->CurType
Where each item is a member name. Not all currency items must be included. If currencyIdentifier is Null or Empty, the currency conversion is removed.
If you specify a currency item that is an invalid member name (case-sensitive), the resulting currency information in the worksheet is not what you expected (not fully set), but no error is returned. If you open the Essbase Currency Report dialog box, the invalid item displays (none) in its list box and the Current Settings are incorrect. |
Returns 0 if successful. A negative number indicates a local failure (see VBA Return Values). A return value greater than zero indicates a failure on the server.
Declare Function EssVSetCurrency Lib "ESSEXCLN.XLL" (ByVal sheetName As Variant, ByVal currencyIdentifier As Variant) As Long
Sub SetCurr()
X=EssVSetCurrency(Empty, "CN$")
If X = 0 Then
MsgBox("Currency conversion successful.")
Else
MsgBox("Currency conversion failed.")
End If
End Sub
Sub ResetCurr()
X=EssVSetCurrency(Empty, Empty)
If X = 0 Then
MsgBox("Currency is back to default.")
Else
MsgBox("Currency conversion failed.")
End If
End Sub