LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Need help re VBA for Worksheet Open Event

Just upgraded from Office 97 (Excel 97) to Office 2003 (Excel 2003). Now
getting "Unprotect Worksheet" prompt with "OK" or "CANCEL" after enabling
macros, for each password-protected worksheet in workbook developed before
upgrade. From my research, it is likely a problem with my Workbook_open
macro. NEED HELP!

Workbook has 5 worksheets. Users enter data in "unlocked" cells. Have
password protected sheets to protect other formulas/formatting. Because
users must be able to use auto-filter at top of worksheet (doesn't work when
worksheet is protected), I pieced together the macro below. Since upgrade,
after enabling macros, users must hit "cancel" for each protected worksheet.
Many people access the workbook numerous times per day, so this is not
functional.

I only know how to "cut & paste" re VBA, so have exhausted my VBA knowledge.
I'm hoping you can help me again!

Private Sub Workbook_Open()
Application.ScreenUpdating = False

With Application
.Calculation = xlManual
.MaxChange = 0.001
.CalculateBeforeSave = False
End With

Dim WS As Worksheet
For Each WS In Worksheets
WS.EnableAutoFilter = True
WS.Protect contents:=True, userInterfaceOnly:=True
Next WS
End Sub

 
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
Open Event Andy Excel Programming 2 December 2nd 04 04:43 PM
user form-on open event? keydown event? FSt1[_3_] Excel Programming 2 August 5th 04 02:26 PM
Event Procedures: Event on Worksheet to fire Event on another Worksheet Kathryn Excel Programming 2 April 7th 04 07:35 PM
Open event Cindy Excel Programming 2 February 10th 04 05:33 PM


All times are GMT +1. The time now is 11:13 PM.

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"