Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm creating a custom ribbon for a workbook in Excel 2007. If I open the Excel file as a zip file, then I can see the customUI.xml file that was created for these modifications to the ribbon to work.

What I would like to do is to protect the Excel file from users opening the file as a zip file and removing the customUI.xml file and thus being able to bypass the custom ribbon controls. I would like to accomplish this without using password protection when opening the file in Excel. Users should be able to open and fill in information in the sheet without entering a password, but they should not have access to the workbook's zip structure content.

Does anyone have an idea how I can accomplish this?

Edit: The solution is to use a VSTO solution.

share|improve this question
up vote 3 down vote accepted

Prevent users from editing the excel file. If the user can edit the file, he can edit it in any way.

share|improve this answer
The user must edit the file and enter data. I just don't want him to access the default menu (Save, Save As etc.). Kind of like a dictator application, but I would like to have my menu overwriting the default menu, and not show up in the AddIn tab. I was also thinking of checking the hashsum of the customUI.xml file to make sure it wasn't tampered, but I'm not sure how to do that in VBA. – Adrian Arsene Nov 16 '11 at 6:48
I'm sure Excel doesn't allow that. – kinokijuf Nov 16 '11 at 16:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.