+ Reply to Thread
Results 1 to 4 of 4

Code to detect if sheets have been moved or deleted

  1. #1
    Registered User
    Join Date
    06-11-2009
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    63

    Code to detect if sheets have been moved or deleted

    I've written a rather large macro which uses sheet indexes. As a consequence even deleting or moving sheets which are not relevant to the code causes an error.

    Is there any way of detecting if sheets have been moved / removed so I can generate a warning for the user.

    Thanks
    Nick

  2. #2
    Valued Forum Contributor JeanRage's Avatar
    Join Date
    03-02-2009
    Location
    Nice, France
    MS-Off Ver
    Excel 2003
    Posts
    705

    Re: Code to detect if sheets have been moved or deleted

    Hi,

    Yes ... (with Excel ... the answer is always Yes ) it can be coded...
    but it would be simpler for you to protect your worbook in order for your users not to ruin your work ...

    HTH

  3. #3
    Registered User
    Join Date
    06-11-2009
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    63

    Re: Code to detect if sheets have been moved or deleted

    Quote Originally Posted by JeanRage View Post
    Hi,

    Yes ... (with Excel ... the answer is always Yes ) it can be coded...
    but it would be simpler for you to protect your worbook in order for your users not to ruin your work ...

    HTH
    Can I protect the workbook and still allow users to modify the data?
    Also, preventing sheet deletion is a simple matter, can I also prevent users from moving them?

  4. #4
    Valued Forum Contributor JeanRage's Avatar
    Join Date
    03-02-2009
    Location
    Nice, France
    MS-Off Ver
    Excel 2003
    Posts
    705

    Re: Code to detect if sheets have been moved or deleted

    The answers to your questions are again ... positive

    For the users to input data, you need to unlock the ranges they will be using ...

    Should you need more info about Protection, never forget F1 ...for help and examples ...

    HTH

+ 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