Data provider types: Essbase, Planning, Financial Management, Hyperion Enterprise
HypPreserveFormatting() applies grid formatting to cells created by zooming in.
HypPreserveFormatting (vtSheetName, vtSelectionRange)
ByVal vtSheetName As Variant
ByVal vtSelectionRange As Variant
vtSheetName:The name of worksheet on which to run the function. If vtSheetName is Null or Empty, the active worksheet is used.
vtSelectionRange: The range of cell(s) in which formatting is to be preserved. Multiple ranges are supported.
Returns 0 if successful; otherwise, the appropriate error code.
Public Declare Function HypPreserveFormatting Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtSelectionRange As Variant) As Long Sub Example_HypPreserveFormatting() Dim oRet As Long Dim oSheetName As String Dim oSheetDisp As Worksheet oSheetName = Empty Set oSheetDisp = Sheet1 oRet = HypPreserveFormatting ("", oSheetDisp.Range("B2")) MsgBox (oRet) End Sub