Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Always open a workbook on Sheet1 regardless of sheet viewed when lastsaved

Is there a macro that will always open a workbook on a designated
worksheet regardless of what sheet the file was saved on when last
visited? I would like to always open the workbook on Sheet1 if the
value of Sheet1!A10. Thanks for any help.

Michael
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Always open a workbook on Sheet1 regardless of sheet viewed when last saved

Private Sub Workbook_Open()
With Me

If .Worksheets("Sheet1").Range("A1").Value 0 Then

.Worksheets("Sheet1").Activate
End If
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
__________________________________
HTH

Bob

"Michael Lanier" wrote in message
...
Is there a macro that will always open a workbook on a designated
worksheet regardless of what sheet the file was saved on when last
visited? I would like to always open the workbook on Sheet1 if the
value of Sheet1!A10. Thanks for any help.

Michael



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Always open a workbook on Sheet1 regardless of sheet viewed whenlast saved

Thanks Bob. It works just as I had hoped.

Michael
Reply
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
2007 excel workbook cannot be viewed unless in full screen Yakutat Excel Discussion (Misc queries) 1 March 19th 09 12:46 PM
Macro to return user to previously viewed sheet Taylor Excel Programming 2 August 19th 08 04:04 PM
Update sheet1 with Data sheet in same workbook Scorpvin[_2_] Excel Programming 1 August 22nd 06 09:26 PM
Search open sheets in workbook and insert into open sheet punx77 Excel Discussion (Misc queries) 0 March 6th 06 05:07 PM
copy sheet1 from all open workbooks to one workbook Mike[_61_] Excel Programming 2 October 31st 03 02:16 PM


All times are GMT +1. The time now is 04:03 PM.

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

About Us

"It's about Microsoft Excel"