Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Paul
Sorry for the late response. I decided on a slightly different workaround which might be useful to other people. These are the steps I took: 1) create a front sheet ("Startup") which displays a message "You must enable macros" 2) write an auto_close() Sub which which calls the Sub Hideworksheets(). This makes all other sheets except "Startup" have the property xlVeryHidden Sub Hideworksheets() ThisWorkbook.Worksheets("Startup").Visible = True For Each Sheet In ThisWorkbook.Worksheets() If Sheet.Name < "Startup" Then Sheet.Visible = xlVeryHidden Next Sheet End Sub 3) write an auto_open Sub which calls the Sub Showworksheets(). This checks the date and if it is still in date then makes all other worksheets have the property Visible Sub Showworksheets() For Each Sheet In ThisWorkbook.Worksheets() If Sheet.Name < "Startup" Then Sheet.Visible = True Next Sheet ThisWorkbook.Worksheets("Startup").Visible = xlVeryHidden End Sub Sub auto_open() Dim mydate As Date mydate = "10-Nov-2006" If mydate < today Then MsgBox ("Project expired on " & mydate & vbCrLf & "Press OK to exit") ActiveWorkbook.Close End If Call Showworksheets End Sub 4) Be sure to Lock the sheets and only unlock the cells you want the user to input to. I would also suggest that you hide the formulae in all cells. 5) Password protect the Modules. One other thing...save a version without the date check for yourself otherwise the whole spreadsheet will be useless after the expiry date. All the best Lloyd |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Custom User Form At Startup | Excel Discussion (Misc queries) | |||
Macros disables under medium security | Excel Programming | |||
Bypassing startup macros | Excel Programming | |||
Bypassing startup macros | Excel Programming | |||
disabling Auto_Open macros | Excel Programming |