Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
gncook
 
Posts: n/a
Default Using AutoFilter with worksheet protection in 2000 vs. 2003

I have created an Autofilter on 2 columns of a protected worksheet in 2000
using a macro that runs upon opening of the worksheet. I am encountering a
problem when a 2003 user tries to open the worksheet but cannot use the
AutoFilter dropdowns. I know that in 2003 it is much easier to use the
Autofilter on a protected worksheet with the AutoFilter option. Anyone have
any ideas how I can create the AutoFilter/Protected worksheet situation that
will work no matter what Excel version is being used?
  #2   Report Post  
Jim Rech
 
Posts: n/a
Default

When I run this code from Workbook_Open in either Excel 2000 or 2003 auto
filtering seems to work okay on the protected sheet:

Sub ProtectSheet()
With Sheet1
.EnableAutoFilter = True
.Protect , True, True, True, True
End With
End Sub

--
Jim
"gncook" wrote in message
...
|I have created an Autofilter on 2 columns of a protected worksheet in 2000
| using a macro that runs upon opening of the worksheet. I am encountering a
| problem when a 2003 user tries to open the worksheet but cannot use the
| AutoFilter dropdowns. I know that in 2003 it is much easier to use the
| Autofilter on a protected worksheet with the AutoFilter option. Anyone
have
| any ideas how I can create the AutoFilter/Protected worksheet situation
that
| will work no matter what Excel version is being used?


  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

If you already have the outline applied, you can protect the worksheet in code
(auto_open/workbook_open??).

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi", userinterfaceonly:=True
.EnableAutoFilter = True
End With
End Sub

It needs to be reset each time you open the workbook. (excel doesn't remember
it after closing the workbook.)

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

gncook wrote:

I have created an Autofilter on 2 columns of a protected worksheet in 2000
using a macro that runs upon opening of the worksheet. I am encountering a
problem when a 2003 user tries to open the worksheet but cannot use the
AutoFilter dropdowns. I know that in 2003 it is much easier to use the
Autofilter on a protected worksheet with the AutoFilter option. Anyone have
any ideas how I can create the AutoFilter/Protected worksheet situation that
will work no matter what Excel version is being used?


--

Dave Peterson
  #4   Report Post  
gncook
 
Posts: n/a
Default

Thanks Dave! This worked fine.

"Dave Peterson" wrote:

If you already have the outline applied, you can protect the worksheet in code
(auto_open/workbook_open??).

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi", userinterfaceonly:=True
.EnableAutoFilter = True
End With
End Sub

It needs to be reset each time you open the workbook. (excel doesn't remember
it after closing the workbook.)

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

gncook wrote:

I have created an Autofilter on 2 columns of a protected worksheet in 2000
using a macro that runs upon opening of the worksheet. I am encountering a
problem when a 2003 user tries to open the worksheet but cannot use the
AutoFilter dropdowns. I know that in 2003 it is much easier to use the
Autofilter on a protected worksheet with the AutoFilter option. Anyone have
any ideas how I can create the AutoFilter/Protected worksheet situation that
will work no matter what Excel version is being used?


--

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
Transfering a hyperlink from an autofilter drop down to a different worksheet Gav via OfficeKB.com Excel Discussion (Misc queries) 0 May 24th 05 10:49 AM
worksheet protection yemi Excel Discussion (Misc queries) 3 May 20th 05 10:12 PM
Copy from worksheet to another x times Union70 Excel Discussion (Misc queries) 0 March 7th 05 09:03 PM
Worksheet Protection and Inserting Pictures Hood Excel Discussion (Misc queries) 1 February 3rd 05 09:53 PM
Worksheet name and Backward compatibility Rich Excel Discussion (Misc queries) 3 November 30th 04 06:10 PM


All times are GMT +1. The time now is 01:28 PM.

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"