View Single Post
 
Old 11-14-2012, 09:01 AM
Andrew H Andrew H is offline Windows 7 32bit Office 2010 32bit
Advanced Beginner
 
Join Date: Nov 2012
Location: Montreal, Quebec
Posts: 51
Andrew H is on a distinguished road
Default Unprotecting a Document via Macro

As per another thread, I am having all sorts of problems getting a macro to run "on exit" from a drop-down list.

I think there is a fundamental issue that I need some help on. In order for a drop-down list to be "active", the document must be in a protected state. So I ensure my document is in a protected state when the document is provided to a user (who will use the drop-down). Fine.


Now suppose I want the macro to insert text "on exit". Well, presumably I have to unprotect the document to do this. Don't I need to therefore insert this line of VBA code in the macro?:

ActiveDocument.Unprotect

When I do this, I still do not get success - when the user makes a selection, the document remains in a protected state and the text is not entered.
Reply With Quote