Thread: excel filter
View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
icsonu icsonu is offline
external usenet poster
 
Posts: 14
Default excel filter

Hello,
I didnt know how to insert a open event in a Workbook.
can u please help me out in applyng the following:
Private Sub Workbook_Open()
Sheets("YourSheetName").Unprotect Password:="YourPassword"
Sheets("YourSheetName").Protect Password:="YourPassword",
UserInterfaceOnly:=True
Sheets("YourSheetName").EnableAutoFilter = True
' repeat the code above for every sheet, you want to allow to be
filtered
End Sub


Regards,
icsonu

"Arvi Laanemets" wrote:

Hi

You must have an Open event for workbook (in ThisWorkbookGeneral):

Private Sub Workbook_Open()
Sheets("YourSheetName").Unprotect Password:="YourPassword"
Sheets("YourSheetName").Protect Password:="YourPassword",
UserInterfaceOnly:=True
Sheets("YourSheetName").EnableAutoFilter = True
' repeat the code above for every sheet, you want to allow to be
filtered
End Sub

--
When sending mail, use address arvil<attarkon.ee
Arvi Laanemets


"Pedro" wrote in message
...
hi! I was trying to put a filter in a protected sheet in my workbook

(Excel
2003)
It doesn't work. is there a way to put it working or it doesn't work at

all?
thanks