PDA

View Full Version : Does Protecting a Project protect against the user selecting the design mode button?



frank_m
11-12-2011, 12:27 AM
I know I should get off my but and just try it instead of asking, it just seems like such an easy question for an expert and I've never setup protecting a project before, so it may take me 5 or 10 minutes, or so, to figure out how to. Then would need to spend who knows how much time thoroughly testing for possible glitches that some of you guys have already run into.

Does Protecting a VBA Project, protect against the user selecting the design mode button?

The goal is that I don't want the user to be able to bypass sheet even code from running, by merely clicking the design mode button.

Thanks

Rob342
11-12-2011, 07:18 AM
Frank

You can password the vbe properties, but you can still see and activate the design button, you must password protect all worksheets for the button to be greyed out.
use code below to hide macro's from user
Option Explicit
Option Private Module

Somebody might have a bit of code to hide it from the menu?
Rob

frank_m
11-12-2011, 07:41 AM
Thanks Rob

I can however still select the design mode button when sheets are all protected
which prevents sheet event code from running.

I had already thought of removing the design mode button from the menu, using code,
my only hesitation is that can code can occasionally cause some headaches to users of other open workbooks in Excel 2003, if the workbook in question crashes

In 2007/2010 it's easy

Thanks for the feedback. I will in the end probably go with running code in the ThisWorkbook open and close event's to remove and restore the design mode button. - Rondebruin has all that at his site