PC Review


Reply
Thread Tools Rate Thread

Always open a workbook on Sheet1 regardless of sheet viewed when lastsaved

 
 
Michael Lanier
Guest
Posts: n/a
 
      12th Jul 2009
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!A1>0. Thanks for any help.

Michael
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      12th Jul 2009
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" <(E-Mail Removed)> wrote in message
news:2c288821-11a1-4b38-9453-(E-Mail Removed)...
> 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!A1>0. Thanks for any help.
>
> Michael



 
Reply With Quote
 
Michael Lanier
Guest
Posts: n/a
 
      13th Jul 2009
Thanks Bob. It works just as I had hoped.

Michael
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update sheet1 with Data sheet in same workbook Scorpvin Microsoft Excel Programming 1 22nd Aug 2006 09:26 PM
copy sheet1 from all open workbooks to one workbook Mike Microsoft Excel Programming 2 31st Oct 2003 02:16 PM
How do I open tif files viewed in IE 6.0 in Imaging for Windows viewed Eric Carey Microsoft Windows 2000 Registry Archive 2 2nd Oct 2003 01:28 AM
How do I open tif files viewed in IE 6.0 in Imaging for Windows viewed Eric Carey Microsoft Windows 2000 Registry 1 2nd Oct 2003 01:28 AM
How do I open tif files viewed in IE 6.0 in Imaging for Windows viewed Eric Carey Microsoft Windows 2000 Registry Archive 0 1st Oct 2003 11:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:34 AM.