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: 1,388
Default Workbook_Open() Not working

The following code works well if run manually but not when the file is open.
What can I do to remedy this?
Thanks.
Private Sub Workbook_Open()
ActiveSheet.Unprotect ' Unprotect the active sheet
' Sort the list by the first field when the workbook is opened.
Range("JobList").Sort Key1:=Range("headers").Columns, _
Order1:=xlAscending, Header:=xlYes
' Select next available row in the second column.
Cells(Range("JobList").Rows.Count, Range("JobList").Column + 1).Select
Selection.End(xlUp).Offset(1).Select
' Protect the active sheet without a password
ActiveSheet.Protect DrawingObjects:=False, _
Contents:=True, Scenarios:=False
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
screenupdating = false not working in Workbook_open sub TommySzalapski[_29_] Excel Programming 6 August 2nd 05 10:52 PM
Workbook_Open not working Sheena N via OfficeKB.com Excel Discussion (Misc queries) 4 May 6th 05 01:31 AM
XL97 Private Sub Workbook_Open() Not Working Pete Excel Programming 6 April 19th 05 08:47 PM
Workbook_Open and Workbook_BeforeClose not working Don[_19_] Excel Programming 0 August 10th 04 06:58 PM
Workbook_Open event not working jason Excel Programming 2 September 7th 03 04:02 PM


All times are GMT +1. The time now is 01:59 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"