AllowFiltering vs EnableAutoFilter
Hi Garry,
Thanks for your reply.
Your 1st implementation is a Worksheet.Protect parameter and was
introduced/added in XL2002.
The 2nd implementation is a Worksheet property, and is how this was
done in versions earlier than XL2002.
I kind of suspected it was a "version" thing, but couldn't seem to locate an authoritative answer.
Using the 1st implementation raises an error if your project is run in
earlier versions. Since they both achieve the same thing, I use the 2nd
implementation only because I do not have to reset protection to turn
it off/on, and some clients still run XL2000.
I understand, makes sense to me.
Note, though, that some of the protection parameters do not persist
after closing the file. For example, if you use code to modify locked
cells on a protected sheet then protection must be removed and reset
for the 'UserInterfaceOnly' parameter to work.
Right, I've run into that one!
Thanks again Garry, much appreciated.
Regards,
Dave
|