+ Reply to Thread
Results 1 to 8 of 8

Not Open Excel File After Fixed Date!

  1. #1
    Forum Contributor
    Join Date
    12-27-2008
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    235

    Not Open Excel File After Fixed Date!

    Not Open Excel File After Fixed Date!
    I got a VB code, from our forum. However, want to make modify as per following.

    Currently, If I put to save excel file all other sheets (except sheet 1) are hidden. (before expire)

    I do not want to be hidden until Excel File expires, by his expire in date like here 2009,01,10

    Code:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by rr1050; 01-05-2009 at 09:43 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I'm not sure what you are asking. Currently it looks like all sheets except one are hidden on closing. If the date is before expiry the sheets are unhidden on opening. This is the best way because if macros are not enabled & the date has passed then the sheets will not be hidden
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    12-27-2008
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    235
    Currently it looks like all sheets except one are hidden on closing. + Saving
    I do not want to be hide when saving.
    I want hide when excel sheet expires! That time just only show sheet1 and message expire
    When I working on sheet 2,3,4 and save it, hides sheet 2,3,4 ---, I do not want Hide, Here again and again need to close excel sheet and open!
    Last edited by rr1050; 01-05-2009 at 11:53 AM.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    I do not want to be hide when saving. I want hide when excel sheet expires!
    1. If you don't hide sheets when saving, someone can just disable macros and open the workbook and see all sheets.

    2. As the code is written, someone can just roll back the date on their computer and open the file. You need to have a hidden sheet that logs each time the workbook is opened, and check to ensure that the time is at least somewhat later than last time.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Contributor
    Join Date
    12-27-2008
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    235
    Above both point answer is to lock the VB Code!

    However, In routine work, I want to access all sheets (Sheet 2,3,4,--) but during saving not to be close, it should be open.

    If excel sheet expires then only Sheet1 visible, so I can (Alt + F11) and access VB code by password and extend periods of expires.

    In another case, if I put only expire after particular date VB code, after expire in date, I cannot be access file (even cannot access data, its just useless) but above code at least I can access sheet1 and VB code and extend expire in date!

    BASICALLY, I NEED!

    I do not want to be hiding other sheets when saving, it should be open! (CLOSE TIME HIDES SHEETS DOES NOT MATTER!)

    Note: - Saving means, I am doing saving after each data entry. (Close time saving, is different!) Might be this cause confusion to understand my question!

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Locking the VBA Project will not prevent users opening the workbook. If the sheets are not hidden then opening the workbook with macros disabled will leave the sheets unhidden after the expiry date.

    EXcel is not a secure system, your existing code will work to an extent. If you change it then it is more vulnerable.

  7. #7
    Forum Contributor
    Join Date
    12-27-2008
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    235
    I agree, as per all comments.
    But can you review my code as per my requirements!

    Thanks!

  8. #8
    Forum Contributor
    Join Date
    12-27-2008
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    235
    Do you think this post having a solution or should I close topic!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1