cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BPC10: Locked EPmFormattingSheet and issue while saving data

0 Kudos
226

Dear Community,

I aIready have the password to unlock the sheets : 'IO_Budget_LC' and 'IO_Budget_MAD', but that password doesn't work for the workbook 'EPMFormattingSheet'.

here's the VBA Code that appears when I click on save data :

Sub Button7_Click()

Set api = Application.COMAddIns("FPMXLClient.Connect").Object
    
    api.SaveWorksheetData
End Sub

Function BEFORE_SAVE()

Set api = Application.COMAddIns("FPMXLClient.Connect").Object

api.SetSheetOption Sheet1, 301, False, "Password", SheetProtectionOptions

If (Range("H1").Value = "ALERT") Then

MsgBox ("ERROR: YOU ARE TRYING TO SEND DATA WITH BOTH GENERAL ACCOUNT DETAIL AND OVERALL VALUE. PLEASE, CLICK -NO- ON THE FOLLOWING SCREEN")

Else
    
End If

api.SetSheetOption Sheet1, 301, True, "Password", SheetProtectionOptions

End Function

Function AFTER_SAVE()

Set api = Application.COMAddIns("FPMXLClient.Connect").Object

    api.RefreshActiveSheet

api.SetSheetOption Sheet1, 301, False, "Password", SheetProtectionOptions

If (Range("H1").Value = "ALERT") Then

MsgBox ("ERROR: YOU SENT DATA WITH BOTH GENERAL ACCOUNT DETAIL AND OVERALL VALUE. PLEASE, DELETE ONE OPTION OF THE CELLS IN RED AND SAVE AGAIN")
Else  
End If
api.SetSheetOption Sheet1, 301, True, "Password", SheetProtectionOptions
End Function

When I refresh the sheet, the data is not saved although the succeed status of saved data appears.

Could you please help me to solve this issue?

Regards,

Accepted Solutions (0)

Answers (0)