Find out if VBA Project is Protected with Golang via C++
Contents
[
Hide
]
Find out if a VBA Project Is Protected in C++
You can determine whether the VBA (Visual Basic for Applications) project of your Excel file is protected using Aspose.Cells via the VbaProject.IsProtected property.
Sample Code
The following sample code creates a workbook and then checks if its VBA project is protected or not. It then protects the VBA project and checks again whether the VBA project is protected. Please see its console output for reference. Before protection, VbaProject.IsProtected returns false, but after protection, it returns true.
Console Output
This is the console output of the above sample code for reference.
IsProtected - Before Protecting VBA Project: False
IsProtected - After Protecting VBA Project: True