Sorting Protected Sheet

  • Thread starter Thread starter Alphonse Giambrone
  • Start date Start date
A

Alphonse Giambrone

I am generating an Excel 2K workbook from an Access application and using
automation to add formatting, data validation, etc and then turning on
protection for the sheet so the recipient can only change/add to certain
columns.
Client now wants to allow the recipient to sort the data and hide columns of
their choosing.
With protection turned on, these fumctions are not available.
Is there any way to allow sorting and hiding columns in a protected sheet.

Thanks,
 
You could always provide your own interface that fires a macro to get
preferences, unprotect the sheet, do the sort, then reprotect the sheet.
 
Hi Alphonse,

So far as I know, the suggestion from Tom will help you a lot on this issue. Please feel free to let me know if you have any further questions.

Thank you for using Microsoft NewsGroup!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Thank you both.
To do that I would need to include the password in the macro and then the
user would have access to it. Is there some way to store the password so
that the macro has access to it, but not the user?

--

Alphonse Giambrone
Email: a-giam at customdatasolutions dot us


Wei-Dong Xu said:
Hi Alphonse,

So far as I know, the suggestion from Tom will help you a lot on this
issue. Please feel free to let me know if you have any further questions.
 
You can protect your code in the VBE under tools.

You can build your own routine to "unscramble" the password so it isn't
stored openly. You could store the password in a hidden name.

password:=MyUnscrambler("ABCDEF")

where myunscrambler would produce the actual password from the string ABCDEF
as an example.

In xl2000 and earlier, you can set the userinteractiveonly property of the
protect method without using the password and your code can sort the sheet
without unprotecting it. In xl2002 and later, you have to supply the
password with this setting.
 
Thanks, I will give it a try.

--

Alphonse Giambrone
Email: a-giam at customdatasolutions dot us
 
Back
Top