Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Can i make a workbook protected

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Singapore
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I want to protect my workbook so that when user delete the workbook, a message will prompt to the user and warn him on the deletion. How can i do this ? Thx


    Regards
    Andrew XJ

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Singapore
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    If can't protect it with a open workbook, can i change some windows setting to protect it? I am using Windows 2000 Pro.

    regards
    Andrew XJ

  3. #3
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Andy, through vba the setattr makes the windows property of the workbook read-only. Makes it hard to overwrite in Excel.

    Code:
    Sub RdOnly()
    SetAttr activeworkbook.fullname, vbReadOnly
    End Sub
    Manually, which you should do with your sys files (unless you update them a lot), right click on the file in your Windows Explorer, select "Properties," and check the read only checkbox.

    Hope this helps.

    _________________
    Cheers, NateO

    [ This Message was edited by: NateO on 2002-03-18 19:00 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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