Remove this Banner Ad

Excel : Filters v Protected Sheet

🥰 Love BigFooty? Join now for free.

Will this help? (got it from the net)

Add this code to the ThisWorkbook object:

Private Sub Workbook_Open()
'Enables the AutoFilter arrows on a protected worksheet named 'mySheet'.
'Must be re-applied for each opening as property not saved

With ActiveWorkbook.Sheets("mySheet")
.EnableAutoFilter = True
.Protect contents:=True, userInterfaceOnly:=True
End With
End Sub
 
Time to learn some Visual Basic :D

The code is quite simple, it's just a matter of getting it into the right place and excel will do the rest for you.

The steps are basically -
1. Open the spreadsheet
2. hit Alt-F11 to open VB for Applications
3. Double click on ThisWorkbook to open the code window
4. In the top left drop down window select workbook. This will create the sub for you.
5. Insert the code from above message
6. Change the MySheet to the name of your sheet
7. save and close everything.
7. Re-open and try it out.

I think that's it..
 

Log in to remove this Banner Ad

Now it's time for you to Shaddup and listen.. :D how do I log out of this stupid ID and log in as my sgPanther one...

I made this name in a moment of insanity then realised how stupid it sounded and on my work PC it won't go away.. :confused:
 
Go to the main forum page and there's a logout option. Choose that, then come back in via your old nickname.

Thanks for your help! I'm a QBasic whiz, but dunno much about VBasic.

Oh and ... some are held for dancing ... and some for fancy dress. :D
 

Remove this Banner Ad

Excel : Filters v Protected Sheet

🥰 Love BigFooty? Join now for free.

Back
Top