Hi nasser,

The following code could be used. There is an Open event and a BeforeSave event. I would recommend you:
1. Insert a blank sheet (or use Sheet1). Protect it with a password (Tools -> Protection -> ProtectSheet) so it cannot be modified.
2. Hide all of the other sheets (select them all and use Format -> Sheet -> Hide).
3. Protect the workbook (Tools -> Protection -> Protect Workbook) with a password. When protecting, make sure 'Structure' is checked. Note the password you use, as it will be coded into the vba code.
4. Open the VB Editor (ALT+F11), double-click on 'ThisWorkbook' in the left-hand column, and paste the two code snippets below into the right-hand window. Change the DateSerial to a date you want, and change any Password:="___" field to the workbook password you set earlier.
5. In the VB Editor window, click Tools -> VBAProject Properties -> Protection Tab. Check 'Lock project for viewing' and set a password.
6. Save your workbook and close it. This should hide all of the sheets except the first, and it hides them in such a way that even if they unprotected the sheet or workbook they couldn't unhide the hidden sheets without breaking into the VBA code.
Private Sub Workbook_Open()
    Dim i As Integer
    
    If Date <= DateSerial(2007, 9, 19) Then
        Application.ScreenUpdating = False
        ThisWorkbook.Unprotect Password:="___"
        For i = 2 To Worksheets.Count
            Worksheets(i).Visible = True
        Next i
        ThisWorkbook.Protect Password:="___"
        Application.ScreenUpdating = True
    Else
        MsgBox "This file cannot be accessed after Sept. 19, 2007."
    End If
End Sub
This Open event determines if today's date is less than or equal to a date you specify (DateSerial(2007,9,19) for example), and if so, unhide the data sheets. If not, pop up a message box letting the user know. The loop through the sheets can be customized, as the one below simply assumes your first sheet (originally "Sheet1" if you have renamed it) will remain visible at all times.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    Dim i As Integer
    
    Application.ScreenUpdating = True
    ThisWorkbook.Unprotect Password:="___"
    For i = 2 To Worksheets.Count
        Worksheets(i).Visible = xlVeryHidden
    Next i
    ThisWorkbook.Protect Password:="___"
    Application.ScreenUpdating = True
End Sub
This BeforeSave event unprotects the workbook, makes all the sheets VeryHidden again, then reprotects the workbook, and finally saves any changes to the data.

Sorry for the novel.

To answer your question about encrypting the passwords within the code.. the simple answer is no. You could probably throw together some obfuscating code so that it's not obvious what the password is (e.g. set a variable to hold a string, and then manipulate it multiple times until it generates the correct password without the user being able to see it, but if someone knew enough to get into your VBA they probably know coding as well and could decipher what you're doing.

Regardless of the password (Worksheet, Workbook or VBA), they can all be cracked, and you don't need to ever know the original password. I, and many other people, can crack them, clear them and set them to whatever we want afterwards all without knowing what you originally set them to.

If you need some of the code customized because it doesn't fit your workbook, please upload the workbook and we can probably take care of that for you.