Results 1 to 7 of 7

Disable Save Prompt

Threaded View

  1. #1
    Registered User
    Join Date
    08-01-2011
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Disable Save Prompt

    Win XP Pro, Version 2002, Service Pack 3

    Hello,

    A coworker wishes to disable the save prompt when closing Excel 2010, despite my best discouragement. This is accomplished easily with one line of code:

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Me.Saved = True
    End Sub
    When this code is placed in the normal template of Word 2010, it works marvelously for all new and existing Word documents. However, I cannot get it to behave similarly in Excel. Excel apparently does not come with a built-in global template, so "personal.xlsb" must be created in the XLStart folder. Despite my not being able to physically see this file (hidden files viewable), I believe it exists because it shows up in my Visual Basic project explorer. I got it there by "recording" a macro and storing it in "Personal Macro Workbook" per the advice of a web reference. When I place the above code in the "personal" template in the same manner as I did in Word, it does not function for new and existing files.

    It may matter that IT has restricted employees from modifying files and folders under "Program Files", therefore I cannot create or save files directly to XLStart.

    Thanks for reading,
    -Daeghen
    Last edited by Daeghen; 03-14-2012 at 08:31 AM. Reason: Solved

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