cancel
Showing results for 
Search instead for 
Did you mean: 

VBA code to download workbook

former_member755507
Discoverer
0 Kudos

Hi All,

I currently have a requirement wherein user should have the flexibility to download the workbook but the downloaded report should not be connected to EPM or should not be refreshed automatically when the user opens the offline workbook.

I have a VBA code already in the workbook as below

-----------------------------------------------------------------------

Sub EPM_Save_Offline()

Dim varResult As Variant

Dim ActBook As Workbook

Application.EnableEvents = False

Application.ScreenUpdating = False

Application.DisplayAlerts = False

Application.Calculation = xlSemiautomatic

lo_epma.SetUserOption "OfflineUnprotected", True

lo_epma.GoOffline

'displays the save file dialog

varResult = Application.Dialogs(xlDialogSaveAs).Show

End Sub

-----------------------------------------------------------------------------------

The above code is working but there are few concerns.

1. The workbook is set to "Refresh data in the whole file while opening it". so, when user saves the file offline and reopen again and connected to EPM, the file is getting refreshed automatically. This should not be the case. When user downloads the workbook, and connects to EPM, the file should not be refreshed automatically

2. In above VBA code user has the flexibility to save the file in the format which he likes to. Do we have a code to download the workbook as a normal workbook instead of giving an option to the user to save the file type as and even when connected to EPM, it should not be refreshed. Basically, it should show only the data in report and when user opens the report, he should not see "EPMOLAPMember" or any EPM related formulas.

Please find EPM details below

Version 10.0 SP38 Patch 3 .NET 4.7.2 x64

BPC 10.1 Standard version

Please let me know in case of any further questions.

Thanks and Regards,

Kovvuri

View Entire Topic
former_member755507
Discoverer
0 Kudos

Hi Vadim,

Thanks a lot for your support. It's working fine now

Regards,

Kovvuri