Is there a Macro to update an Essbase Query in Multiple Tabs?

Grepees

Board Regular
Joined
Apr 15, 2009
Messages
81
Hello you good people out there,

I am working in a file that has 82 tabs. In each of these tabs is an Essbase query that needs to be updated to a range of cells that are consistent in all 82 tabs. It becomes very cumbersome to update these files as one has to go through each 82 tabs, highlight the essbase download section and retrieve Essbase updates. Sometimes some of these tabs are missed and then hell breaks loose.......Is there a macro that i can run to update all tabs at once. I already tried highlighting all tabs to update in one tab with the hope that all the highlighted tabs will also update but it didn't work. Any help out there would be most appreciated. Thank you very much.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi

It's been quite a few years since I've used Essbase but I know that it's possible to automate it with VBA. A quick Google search revealed this document: http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_ss_user.pdf

The EssVCalculate function looks like it might do what you need. I cannot test this but see how this works for you:

Code:
Declare Function EssVCalculate Lib "ESSEXCLN.XLL" (ByVal sheetName As Variant, ByVal calcScript As Variant, ByVal synchronous As Variant) As Long

Sub RunCalculate()
    Dim sht As Worksheet
    Dim RetVal As Variant
    Dim sStatusMsg As String


    For Each sht In ActiveWorkbook.Worksheets

        sht.Activate

        RetVal = EssVCalculate(Empty, "Default", False)

        If RetVal <> 0 Then
            sStatusMsg = sStatusMsg & "Sheet: " & sht.Name & " failed to calculate." & vbCr
        End If


    Next sht

    If Len(sStatusMsg) > 0 Then
        MsgBox "One or more sheets failed to calculate:" & vbCr & sStatusMsg, vbExclamation, "Essbase Error"
    Else
        MsgBox "All sheets calculated successfully.", vbInformation, "Success"
    End If



End Sub


HTH
DK
 
Last edited:
Upvote 0
Thank you very much for your replay DK. The Macro did not work. It came back and listed almost all the Tabs saying that Essbase could not update the tabs. Is there anything i should do besides just copying the VBA and trying to run the macro? Thanks
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,750
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top