+ Reply to Thread
Results 1 to 6 of 6

Restrict user from over-writing workbook

  1. #1
    Registered User
    Join Date
    07-02-2008
    Location
    United States
    Posts
    23

    Restrict user from over-writing workbook

    I have a workbook (with VBA code) that I don't want the user to be able to save over. If the user wants to save the work they have done so far in the workbook, they will need to save it under a different name.

    I'm assuming this will include the "before save" event. But past this, I don't know where to go.

    As an example of what I would like the code to do:

    The original file name is "ExampleFileName.xls"

    The user goes to save (either under 'save as' or 'save') and attempts to save the file under its original name ("ExampleFileName.xls"), then I want to prompt the user with a msgbox telling them that they can't save the file under that name and that they will need to go back and save it under a different name.

    Any advice? Thanks.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    How about saving your file as a Template?
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    07-02-2008
    Location
    United States
    Posts
    23
    I'm not sure what you mean. Can you explain why I would want to do that?

    Also, I don't know what a template is.

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Excel's help system can explain a Workbook Template better than I can.

  5. #5
    Registered User
    Join Date
    07-02-2008
    Location
    United States
    Posts
    23
    OK, I see now. But, as I am testing it...excel does allow me to save over a template file. Do I have to set some option that restricts me from saving over the file?

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Make it read-only.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Copy rows when column matches a user input from another workbook
    By cjc155 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-21-2008, 04:33 AM
  2. Copying worksheets within the same workbook
    By kostas in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-15-2008, 05:51 AM
  3. Add multiple spreadsheets to single spreadsheet
    By tmotommyo in forum Excel General
    Replies: 5
    Last Post: 02-06-2008, 11:35 PM
  4. Refence another workbook based on value in a cell
    By tonywig in forum Excel General
    Replies: 4
    Last Post: 05-10-2007, 09:59 AM
  5. Choose and Use Open Workbook from Userform
    By EphesiansSix in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-04-2007, 09:29 AM

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