LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 465
Default Workbook_Open code help

In article , Paul
writes

Hi Colin,

You're getting errors because Sheet2 is not the active sheet when
you're trying to select cell A200. Try this instead:
Code:
--------------------

Private Sub Workbook_Open()
With Application
.ScreenUpdating = False
.Goto Sheets("Sheet1").Range("A200"), scroll:=True
.Goto Sheets("Sheet2").Range("A200"), scroll:=True
.ScreenUpdating = True
End With
End Sub


Hi Paul

OK Thanks for your help.

I couldn't get it working , unfortunately. I think it's my fault in that
I do have some other code already there which may be interfering.


This is the code I already have :

Private Sub Workbook_Open()

Dim mysheets As Sheets
Set mysheets = Worksheets(Array(1))
For Each Sheet In mysheets
Sheets("Sheet1").ScrollArea = "A1:L26"
Sheets("Sheet2").ScrollArea = "A1:L26"

Next

Range("A200").Select


End Sub


Can your code be integrated to have the desired effect?

Thanks again for your time and expertise.

 
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
Private Sub Workbook_Open() doesn't run Steve Starr Excel Discussion (Misc queries) 4 April 3rd 11 05:05 AM
About workbook_Open madro Miguel Angel Excel Worksheet Functions 0 November 2nd 06 12:00 PM
Problem with Workbook_open Vick Excel Discussion (Misc queries) 13 February 14th 06 10:40 PM
Deleting Workbook_Open code Paige Excel Discussion (Misc queries) 3 January 31st 06 07:39 PM
Workbook_Open () Bill Martin Excel Discussion (Misc queries) 12 December 20th 05 05:37 PM


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