Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Mar 2005
    Location
    London, Hampshire, United Kingdom
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CLOSE WITHOUT SAVING (2007)

    In Word I have a macro attached to a keypress which closes the document without offering me the chance to save - an alternative to Ctrl-F4.

    Does anyone know a way to get the same result in Excel 2007? So that any workbook could be closed with one keypress and no prompt to save?

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CLOSE WITHOUT SAVING (2007)

    Does this do what you want?

    <code>
    Public Sub CloseActiveWorkbook()
    ActiveWorkbook.Close SaveChanges = False
    End Sub
    </code>
    Legare Coleman

  3. #3
    Star Lounger
    Join Date
    Mar 2005
    Location
    London, Hampshire, United Kingdom
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CLOSE WITHOUT SAVING (2007)

    It does - thank you. Can it be associated with, connected, linked with, whatever the expression is, a keypress?

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CLOSE WITHOUT SAVING (2007)

    Yes. One way would be to put the macro into your Personal.xls (see star <post:=118,382>post 118,382</post:>). Then you can open Excel and select Macro from the Tools manu and then select Macros from the fly out menu. Then select the macro in the list in the resulting dialog box and click on the Options button. This should give you a dialog box where you can select the key combination you want to use for the macro.
    Legare Coleman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •