+ Reply to Thread
Results 1 to 6 of 6

On-Open Macro: Disclaimer Page

Hybrid View

  1. #1
    Registered User
    Join Date
    01-17-2006
    Posts
    46

    On-Open Macro: Disclaimer Page

    Hello all,

    I would like to insert a macro into an excel file so that when the file is opened only a disclaimer page is visible (presumably this involves some 'hide sheets' code.)

    The disclaimer page would include a dialog box with an OK button. When the user clicks OK, the rest of the file is accessible.

    I have tried to copy the approach of other files, however parts of the code are password protected (presumably to avoid overriding the disclaimer process.)

    If anyone could please help with:

    - The "On-Open" Command
    - The location to put the code
    - The Code to get a dialog box
    - Any suggestions for code that would achieve the rest of my goal described above.

    Thanks very much in advance.

    Regards,

    Heski

  2. #2
    Forum Contributor
    Join Date
    11-23-2005
    Location
    Perth, Australia
    Posts
    218

    On-Open Macro: Disclaimer Page

    Hi Heski

    Have a look at the attached file and let me know if this is what you want...
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    01-17-2006
    Posts
    46

    Reply to Steel Monkey

    Steel Monkey.

    Thank you.

    That is exactly what I'm after, yes.

    The only additional functionality I'm seeking is to have all sheets hidden when the disclaimer is brought up, and then shown when the disclaimer is accepted.

    Could you please share the code and location?

    Heski

  4. #4
    Forum Contributor
    Join Date
    11-23-2005
    Location
    Perth, Australia
    Posts
    218

    On-Open Macro: Disclaimer Page

    Have a look at the attached file.

    Keep in mind if Macros are not enabled this will not work, also if the application.enableevents is set to false the on open macro wont work

    So what I am trying to say is that it is not fool proof, If it contains sensitive info consider paswword protecting the file(but even this isnt foolproof either)

    But have a look around at the code and see if it helps!
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-17-2006
    Posts
    46

    Password Protection

    Thanks,

    That was a big help.

    Do you (or anyone) know how to close the vbcode and password protect it to prevent it being opened and modified (and thereby bypassing the disclaimer?)

    Thanks again,

    Heski

  6. #6
    Forum Contributor
    Join Date
    11-23-2005
    Location
    Perth, Australia
    Posts
    218

    On-Open Macro: Disclaimer Page

    To password protect the code, go to the IDE go to tools->VBA Project Properties->Protection select lock project for viewing(something like that anyway) and put in a password there

+ 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