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:
 
Not a problem, I've deleted the other thread for you :)

Welcome to the forums by the way! :wave:
 
Back
Top