Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Jun 2005
    Location
    Singapore
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Disable Marcos (Office XP)

    Hans and all,

    Is it possible to disable all the marcos after a certian time period?

    cheers, francis

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Disable Marcos (Office XP)

    Francis,

    Please explain what you want to accomplish. Do you meant that macros (not marcos) should stop working 30 minutes after the workbook has been opened, each time? Or should they stop working after August 31, 2005? Or something else?

  3. #3
    Star Lounger
    Join Date
    Jun 2005
    Location
    Singapore
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable Marcos (Office XP)

    Hans,

    It is the 2nd option I am looking at - stop working after a date

    thanks, francis

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Disable Marcos (Office XP)

    You want the workbook to be available for use, but you want macros to stop working after a certain date? You could build a check into each macro:

    Sub MyMacro()
    If Date >= #09/01/2005# Then Exit Sub
    ...
    ...
    End Sub

    Note: you must use US date format mm/dd/yyyy if you include a literal date in VBA code.

    To prevent users from viewing and altering the macros, you should set a password on the VBA code:
    - In the Visual Basic Editor, select Tools | VBAProject Properties...
    - Activate the Protection tab.
    - Tick the "Lock project for viewing" check box.
    - Enter the password twice.
    - Click OK.
    Determined hackers will be able to break the protection, there are many password crackers available on the Internet.

  5. #5
    Star Lounger
    Join Date
    Jun 2005
    Location
    Singapore
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable Marcos (Office XP)

    Hans,

    Thanks. I will try to create a com for it.

    cheers, francis

Posting Permissions

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