OIE66
OIE66

Reputation: 23

Protect Workbook from xlam Add-ins

I have an excel file with some password-protected VBA code. Through this code some sheets are hidden (status=xlsVeryHidden).

But if I load an .xlam Add-in module, I can turn the sheets to Visible again (looping for each worksheet, changing the status).

Is there a way to prevent any .xlam add-in from being installed on a specific workbook (the workbook will be shared to other users at a later stage) ?

Or is there something "stronger" than xlsVeryHidden (so that it cannot be reversed) ?

Thanks

Upvotes: 0

Views: 501

Answers (3)

You can protect yourself with:

Application.ActiveWorkbook.Protect "Password ", True
Application.ActiveWorkbook.Save

Upvotes: 1

joehanna
joehanna

Reputation: 1489

If you Protect the Structure of your workbook with a password after you hide the sheet, then code from another workbook or add-in will not be able to "unhide" it unless the turn off protection first using that password.

Upvotes: 0

Siddharth Rout
Siddharth Rout

Reputation: 149287

Is there a way to prevent any .xlam add-in from being installed on a specific workbook

The Add-Ins are not installed on a specific workbook. They are installed on your Excel Application :)

If your Add-In is making your worksheets visible that is because there must be some code in the Add-In which is making it visible.

Or is there something "stronger" than xlsVeryHidden (so that it cannot be reversed) ?

No.

BTW ADDIN or NO ADDIN, You can loop through the sheets and make them visible. The only way to protect the sheets from being visible is to Protect your workbook(different than protecting the worksheet) after you hide your worksheets.

Upvotes: 0

Related Questions