ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Always open a certain worksheet if date is past? (https://www.excelbanter.com/excel-discussion-misc-queries/151441-always-open-certain-worksheet-if-date-past.html)

wx4usa

Always open a certain worksheet if date is past?
 
Is there a macro or something that will open a specific sheet if a
date is past due? For example, if the date in cell C1 on sheet 1 is
older than today, can the excel workbook always open to sheet 7 from
that point forward?


Gord Dibben

Always open a certain worksheet if date is past?
 
Private Sub Workbook_Open()
If Sheets("Sheet1").Range("C1").Value < Date Then
Sheets("Sheet7").Activate
End If
End Sub

Place into Thisworkbook module.


Gord Dibben MS Excel MVP


On Tue, 24 Jul 2007 13:29:42 -0000, wx4usa wrote:

Is there a macro or something that will open a specific sheet if a
date is past due? For example, if the date in cell C1 on sheet 1 is
older than today, can the excel workbook always open to sheet 7 from
that point forward?




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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com