+ Reply to Thread
Results 1 to 6 of 6

Prevent saving

Hybrid View

LydiasDad Prevent saving 07-10-2011, 09:45 PM
docMed Re: Prevent saving 07-11-2011, 01:07 AM
royUK Re: Prevent saving 07-11-2011, 01:20 AM
docMed Re: Prevent saving 07-11-2011, 01:22 AM
snb Re: Prevent saving 07-11-2011, 03:37 AM
LydiasDad Re: Prevent saving 07-11-2011, 02:40 PM
  1. #1
    Registered User
    Join Date
    06-29-2011
    Location
    California
    MS-Off Ver
    Excel 2003/2007
    Posts
    58

    Re: Prevent saving

    If you search the forums, or even google, this can be found quite easily...

    In the future try to do so first, otherwise put this code in your 'ThisWorkbook' module (push alt+f11 to pull open your vba editor, double clik 'thisworkbook' and copy/paste the following code, then save the workbook - follow these steps and you will no longer be prompted to save).

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    ThisWorkbook.Saved = True
    End Sub
    You can disable the file save menu by exploring the commandbars feature...

    You could do something like...

    Private Sub Workbook_Open()
    CommandBars("File").Controls("The Name of the control you want to disable").Enabled = False
    'note, a control is simply the name of the function you want to use on a menu, such as click "File" >> Then click "Save" - in this case, the commandbar is the file menu, and the control is "Save"
    End Sub
    Last edited by docMed; 07-11-2011 at 01:12 AM.

+ 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