PPRuNe Forums - View Single Post - Excel - Sorting In A Protected Worksheet
View Single Post
Old 22nd September 2004 | 12:07
  #4 (permalink)  
Agent86
20 Anniversary
 
Joined: Mar 2003
Posts: 195
Likes: 2
From: Aus
AA.

You need to add the command

ActiveSheet.Unprotect "xxxx"

at the start of your sorting macro

and the command

ActiveSheet.Protect "xxxx"

at the end. xxx is the password for the sheet protection.

Then to stop people from seeing your password you need to protect the VB code.

In Excel 2000 this is done from the VB editor. Rt click on the Modules folder and select VBAProject Properties On the Protection tab tick the "Lock project for viewing" and enter/re-enter a password.

XP may be slightly different.

Let me know if this helps

MAx
Agent86 is offline