Excel Excel VBA Protect setting

Joined
Jan 4, 2013
Messages
4
Reaction score
0
Hi,

I have written a small macro to create a number of copy files from a template.
The macro works fine but has one small issue:
I have protected one worksheet so only select cells can be used by users.
On the master file worksheet, this works fine and in VBA I see:
EnableSelection = 1 - xlUnlockedCells
One the other file worksheets, I can still select the cells (but cannot input to them), and in VBA I see:
EnableSelection = 0 - xlNoRestrictions

In the macro, I have
Activesheet.Protect Password:="1234"
ActiveSheet.EnableSelection = xlUnlockedCells

I thought this would be enough as I have tested it with a test macro on the master.

Could you tell me what I have done wrong or am missing?

Thanks

AgLon :confused:
 

Becky

Webmistress
Joined
Mar 25, 2003
Messages
7,424
Reaction score
1,511
Not a problem, I've deleted the other thread for you :)

Welcome to the forums by the way! :wave:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top