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: 454
Default Do 3 Tasks on Opening File Q

I am trying to do 3 things when I open up a file

1) Unprotect all worksheets in the file
2) Go to A1 in all sheets
3) Finally activate C6 in the sheet Current week

I had 2 & 3 above working and I tried adding 1 above, but am hitting
debug so I guess I have some syntax wrong




Private Sub Workbook_Open()
Application.ScreenUpdating = False
Dim sh As Worksheet
For Each sh In ThisWorkbook.Worksheets

ws.unProtect Password:="1234"

Next Dim sh As Worksheet

Dim sh As Worksheet

For Each sh In ThisWorkbook.Worksheets
sh.Select
Application.GoTo Reference:=sh.Range("a1"), Scroll:=True
Next sh
ThisWorkbook.Sheets("Current Week").Select
Application.ScreenUpdating = True
ActiveWindow.Zoom = 75

Range("C6").Select

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
opening a file in Excel starts application but dose not open file Bob Shelton Excel Discussion (Misc queries) 1 July 2nd 08 07:51 PM
File:1 and File:2 -- Double Files when Opening One File dallin Excel Discussion (Misc queries) 1 January 25th 07 02:53 AM
Export to Palm Tasks? (.TDA file) Sunday88310 Excel Discussion (Misc queries) 0 November 30th 06 05:12 AM
Export to Palm Tasks? (.TDA file) Debtet Excel Discussion (Misc queries) 0 November 30th 06 12:41 AM
opening an excel file opens a duplicate file of the same file skm Excel Discussion (Misc queries) 1 December 7th 05 05:52 PM


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