Thread: Protection
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
AB[_2_] AB[_2_] is offline
external usenet poster
 
Posts: 236
Default Protection

You could:
1. protect (as per earlier post by Prject Mangler) your wb or ws
(depending on what you want)
2. write your 'Run' code so that it:
2.1. unprotects the wb/ws
2.2. does the thing you want
2.3. re-protects teh wb/ws again.
Additional (not fool-proof) feature you can implement is you can
change your fileaccess to read-only on the fly, if you want to.

This way your file would be 'open' for user to mess about only during
the macro run time (during which they can't mess around with it) or
when it's read-only (and then you almost don't care).