LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Junior Member
 
Posts: 24
Default Code for multiple worksheets

I am using excel 2000

How can I make the following code, saved in the This Workbook module available to

either all worksheets in the workbook

or specifically an additional worksheet called "Commission Achievement" as well as the "Missing Data" worksheetin my workbook

The code allows filterring on protected sheets

Private Sub Workbook_Open()
'check for filter, turn on if none exists
With Worksheets("Missing Data")
If Not .AutoFilterMode Then
.Range("A3").AutoFilter
End If
.EnableAutoFilter = True
.Protect _
Contents:=True, UserInterfaceOnly:=True
End With
End Sub


Thanks

Paul
 
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
I need to know how to color code tabs on the Excel worksheets Kim@excal Excel Discussion (Misc queries) 3 June 6th 08 05:01 PM
Combine Worksheets - help with Code! CherylH Excel Discussion (Misc queries) 1 September 13th 07 03:45 PM
Delete Blank Rows Code - Multiple Worksheets - Multiple Documents BenS Excel Discussion (Misc queries) 3 June 29th 07 12:20 AM
Need help on code - Macro on multiple worksheets J@Y Excel Discussion (Misc queries) 2 February 2nd 07 08:05 PM
deleting selected worksheets using vb code George Excel Discussion (Misc queries) 1 October 31st 06 05:14 PM


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

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

About Us

"It's about Microsoft Excel"