I am looking to create a VBA that will refresh an Essbase sheet automatically. I am struggling to do so because of being relatively new to the wordage in VBA. This is what I am trying to use, but I receive an error saying "Sub RunCalculate () is incorrect:
Sub Essbase()
'
' Essbase Macro
'
Declare Function EssVCalculate Lib "ESSEXCLN.XLL" (ByVal sheetName As
Variant, ByVal calcScript As Variant, ByVal synchronous As Variant) As Long
Sub RunCalculate()
X = EssVCalculate("[2016 Shop Income Statement Summary March.xlsm]Hyperion CY Refresh Sheet", "Default", "")
If X = 0 Then
MsgBox ("Calculation complete.")
Else
MsgBox ("Calculation failed.")
End If
End Sub
If helpful:
- The sheet name to be updated is "2016 Shop Income Statement Summary March.xlsm
- The sheet tab name is "Hyperion CY Refresh Sheet"
Bookmarks