Marco
Marco

Reputation: 95

Disable edit options from macro enabled Excel file

I've recently created a tool via excel using vba and macros to sort text and I would like to save it a way that when a user opens it, he will not have access to the files ribbons and he will not be given an option to edit the file or the workbook.

I've already protected the cells and converted it to read only but still the user is given an option to enable editing and what not.

I've found Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" but it affects all other workbooks. Is there a way to do this on a specific workbook alone? Like

If Activeworkbooks = Specificworkbook.xlsm Then
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
End IF

Upvotes: 1

Views: 1291

Answers (1)

mongoose36
mongoose36

Reputation: 799

Yes there is! I've used this particular trick many times...Essentially you will be editing the XML of the ribbon. See here and here for instructional tutorials. It will involve downloading the editor, but once that is done you can edit the ribbon of a single file and it won't effect other files. It's a great way to "lock" down a file to allow end users to only do what you as the developer want them to.

Upvotes: 1

Related Questions