Results 1 to 5 of 5

Stop an excel workbook or worksheet from opening if workbook isn't in a certain folder

Threaded View

  1. #1
    Registered User
    Join Date
    09-19-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    13

    Stop an excel workbook or worksheet from opening if workbook isn't in a certain folder

    Hello All,

    Is there anyway to write some VBA code to prevent a workbook from being opened if has been moved or saved to a different folder location. The reason is to prevent people from saving the certain document to a different location, so there can only be one copy available.

    I have added in macros to prevent saving and there are macros included to save a shortcut to the users desktop so there is no need to make a copy, these work quite effectively, but the only issue is if someone doesn't allow macros to run then the document can be saved regardless of the macro preventing saving.

    So would such a macro be possible to check, if the workbook isn't located in e.g. C:/test then it will give an error message saying please use original workbook.

    Any help would be much appreciated.

    Thanks very much,

    Paul
    Last edited by Raulus; 03-05-2013 at 05:31 AM.

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