Find out if VBA Project is Protected

Find out if VBA Project is Protected in Python

You can find if the VBA (Visual Basic Applications) Project of your Excel file is protected or not with Aspose.Cells for Python via .NET using VbaProject.is_protected property.

Sample Code

The following sample code creates a workbook and then checks if its VBA project is protected or not. Then it protects the VBA project and again checks if its VBA project is protected or not. Please see its console output for a reference. Before protection, VbaProject.is_protected returns false but after protection, it returns true.

Console Output

This is the console output of the above sample code for a reference.

IsProtected - Before Protecting VBA Project: False

IsProtected - After Protecting VBA Project: True