I am putting below custom code in SSRS report,
Option Explicit
Private Sub Workbook_Open()
Application.ErrorCheckingOptions.BackgroundChecking = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ErrorCheckingOptions.BackgroundChecking = True
End Sub
But it's giving me compilation error as below,
Severity Code Description Project File Line Suppression State Error [rsCompilerErrorInCode] There is an error on line 1 of custom code: [BC30627] 'Option' statements must precede any declarations or 'Imports' statements.
Do I need to include any library or namespace for this?