Hi,
I am trying to write an Essbase macro that will either turn the retain options all off or on but am having trouble.
For example, the one to turn the retain formulas options off I have got:
Declare Function EssVSetSheetOption Lib "ESSEXCLN.XLL" (ByVal sheetName As Variant, ByVal item As Variant, ByVal sheetOption As Variant) As Long
then:
sub Turnoff()
X = EssVSetSheetOption(Null, 11, True)
X = EssVSetSheetOption(Null, 22, True)
X = EssVSetSheetOption(Null, 23, False)
X = EssVSetSheetOption(Null, 22, False)
X = EssVSetSheetOption(Null, 21, False)
X = EssVSetSheetOption(Null, 11, False)
End sub
However, when I try to run it is gives three error messages:
1. Suppress Zero or Missing options cannot be modified in Formula Preservation mode
2. Same again
3. The retain on and keep and remove options cannot be modified with the Both Member Name and Alias option set
I am confused because I have code above this that makes sure suppress missings is off first anyway - and I don't try and modify the Member Name and Alias setting either!
Thanks
Liam
I am trying to write an Essbase macro that will either turn the retain options all off or on but am having trouble.
For example, the one to turn the retain formulas options off I have got:
Declare Function EssVSetSheetOption Lib "ESSEXCLN.XLL" (ByVal sheetName As Variant, ByVal item As Variant, ByVal sheetOption As Variant) As Long
then:
sub Turnoff()
X = EssVSetSheetOption(Null, 11, True)
X = EssVSetSheetOption(Null, 22, True)
X = EssVSetSheetOption(Null, 23, False)
X = EssVSetSheetOption(Null, 22, False)
X = EssVSetSheetOption(Null, 21, False)
X = EssVSetSheetOption(Null, 11, False)
End sub
However, when I try to run it is gives three error messages:
1. Suppress Zero or Missing options cannot be modified in Formula Preservation mode
2. Same again
3. The retain on and keep and remove options cannot be modified with the Both Member Name and Alias option set
I am confused because I have code above this that makes sure suppress missings is off first anyway - and I don't try and modify the Member Name and Alias setting either!
Thanks
Liam