+ Reply to Thread
Results 1 to 4 of 4

Disable closing workbook

  1. #1
    Registered User
    Join Date
    01-07-2005
    Posts
    14

    Disable closing workbook

    Hello,

    I've written a macro wich first protects the worksheet with a password and then closes the workbook.

    I want other users to use this macro and not be able to close the workbook with CTR-F4 or by clicking on the cross on the right top corner.

    Does anyone know how to disable these options or better, how to connect these to my macro?

    Greetings,
    Edcel.

  2. #2
    Forum Contributor
    Join Date
    12-04-2003
    Posts
    360
    why dont you put the protect macro as follows:

    sub auto_close

    [your protect code here]

    end sub

    it must be called auto_close!

    This will run when the workbook is closed.

  3. #3
    Registered User
    Join Date
    01-07-2005
    Posts
    14
    I've tried it but it doesn't work.

    Should it be a class or private?

    Any other suggestions?

    Edcel.

  4. #4
    Registered User
    Join Date
    01-07-2005
    Posts
    14
    Forget what I've replied.

    Tried it again in a different module and it works.

    Thanx!!

+ 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