Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Enable filter to work in a protected sheet from Excel 2003 to 2000

Hi,

I use XP SP2 MS Office 2003.
I created a WB with a WS using the Filter function, and since I wanted to
protect the WS, in order to allow the filter to work I've checked the Filter
box. So far so good.

Unfortunately, some of the users have OS W2K - MS Office 2000 or OS XP SP1 -
MS Office 2000.
As a result, when they try to use the filter function, it doesn't work.

I entered the following code to solve the issue, but still the problem is
there.

Private Sub Workbook_Open()
'Allow filter to work in Excel 2000
With Worksheets("Sheet1")
If Not .AutoFilterMode Then
.Range("A1").AutoFilter
End If
.EnableAutoFilter = True
.Protect Password:="password", _
Contents:=True, UserInterfaceOnly:=True
End With
End Sub

Can you help me in understanding where I'm wrong?

Thanks
Alex

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Enable filter to work in a protected sheet from Excel 2003 to 2000

Hi,

I know it's Friday and I wouldn't like to stress, but if you can come out
with a suggestion I really would appreciate it :)

Thanks
Alex

"Metallo" wrote:

Hi,

I use XP SP2 MS Office 2003.
I created a WB with a WS using the Filter function, and since I wanted to
protect the WS, in order to allow the filter to work I've checked the Filter
box. So far so good.

Unfortunately, some of the users have OS W2K - MS Office 2000 or OS XP SP1 -
MS Office 2000.
As a result, when they try to use the filter function, it doesn't work.

I entered the following code to solve the issue, but still the problem is
there.

Private Sub Workbook_Open()
'Allow filter to work in Excel 2000
With Worksheets("Sheet1")
If Not .AutoFilterMode Then
.Range("A1").AutoFilter
End If
.EnableAutoFilter = True
.Protect Password:="password", _
Contents:=True, UserInterfaceOnly:=True
End With
End Sub

Can you help me in understanding where I'm wrong?

Thanks
Alex

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Enable filter to work in a protected sheet from Excel 2003 to 2000

My first guess is that the worksheet is protected, but a filter doesn't exist.

Then when your code runs, it tries to apply the filter and blows up because of
the protected worksheet.

Maybe unprotecting the worksheet before applying the .autofilter would be
sufficient.

If that's not it, you may want to post the details of the problem.

Metallo wrote:

Hi,

I use XP SP2 MS Office 2003.
I created a WB with a WS using the Filter function, and since I wanted to
protect the WS, in order to allow the filter to work I've checked the Filter
box. So far so good.

Unfortunately, some of the users have OS W2K - MS Office 2000 or OS XP SP1 -
MS Office 2000.
As a result, when they try to use the filter function, it doesn't work.

I entered the following code to solve the issue, but still the problem is
there.

Private Sub Workbook_Open()
'Allow filter to work in Excel 2000
With Worksheets("Sheet1")
If Not .AutoFilterMode Then
.Range("A1").AutoFilter
End If
.EnableAutoFilter = True
.Protect Password:="password", _
Contents:=True, UserInterfaceOnly:=True
End With
End Sub

Can you help me in understanding where I'm wrong?

Thanks
Alex


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to enable Copy/Paste on protected work sheet? dveeraj New Users to Excel 1 August 10th 09 06:49 PM
UDF doesn't work on a protected sheet in Excel 2003 CarpeDiem Excel Discussion (Misc queries) 1 February 10th 09 08:49 PM
UDF doesn't work on a protected sheet in Excel 2003 CarpeDiem Excel Discussion (Misc queries) 0 February 10th 09 08:13 PM
UDF doesn't work on a protected sheet in Excel 2003 CarpeDiem Excel Discussion (Misc queries) 0 February 10th 09 08:13 PM
Excel 2000 and filter feature in a protected workbook Mohan[_3_] Excel Programming 1 October 9th 03 01:27 PM


All times are GMT +1. The time now is 05:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"