Excel VBA - Check if VBA Project is Protected and Locked for Viewing

Опубликовано: 28 Сентябрь 2024
на канале: The World Of Algorithms
484
like

💡 Source Code

Sub CheckVBAProtection()
If ThisWorkbook.VBProject.Protection = vbext_pp_locked Then
MsgBox "Do not worry. Your VBA Project is protected", vbInformation + vbOKOnly, ""
Else:
MsgBox "Warning! Your VBA Project is not protected", vbExclamation + vbOKOnly, ""
End If
End Sub

Private Sub Workbook_Open()
Call CheckVBAProtection
End Sub
------------------------------------------------------------------------------------------

#excel
#msexcel
#msexceltutorial
#msexcelcourse
#vba
#vbatutorial
#excelvba
#fulltutorial
#excelvbatutorial
#microsoftexceltutorial
#tutorial
#exceltutorial
#advancedexcel
#advancedexceltraining
#tutor
#exceltutor
#exceltutoring
#exceltutoringonline
#onlineexceltutoring
#algorithm
#algorithms
#programming
#program
#script
#vbamacro
#vbamacros
#usingmacro
#veryuseful
#useful
#veryusefulmacro
#freeeducation
#freeprogramming
#freelancer
#excelfreelancer
#vbafreelancer
#freelanceservices
#vbaprojectlock
#vbaprojectprotection
#lockproject
#lockforviewing
#lockprojectforviewing
#checkiflocked
#checkifprotected
#excelvbaproject
#vbaproject
#password
#protection