Hello to the group members!
Can someone help me with VBA code for determining if an excel file has 'specific excel-based add-ins' (i have a list of specific add-ins) loaded and password protected? Any help is appreciated.
Note: I have the below code to determine if macros stored under VBAProject are locked or not. But this code is not able to determine if there are add-ins that are locked (as these add-ins are not stored under VBAProject but just outside of VBAProject).
Any help is appreciated.-------------- Sub wsht_macro_protect(Ana_Name, sht_Count, pro_Prot, sht_Prot_cnt, sht_Prot) Dim sh As Worksheet Dim wb As Workbook Application.Calculation = xlCalculationManual Application.ScreenUpdating = False Application.DisplayAlerts = False Application.AskToUpdateLinks = False Set wb = Workbooks(Ana_Name) 'Input workbook name here or use do ...loop 'Initialization sht_Count = 0 sht_Prot_cnt = 0 sht_Prot = "" pro_Prot = "" wb.Activate sht_Count = Sheets.Count If wb.VBProject.Protection = vbext_pp_locked = True Then pro_Prot = "Protected" End If For Each sh In wb.Worksheets If sh.ProtectContents = True Then sht_Prot_cnt = sht_Prot_cnt + 1 sht_Prot = "Protected" End If Next sh Application.Calculation = xlCalculationAutomatic Application.ScreenUpdating = True Application.DisplayAlerts = True Application.AskToUpdateLinks = True End Sub ------------------
Thank you
Ram.



Reply With Quote
