+ Reply to Thread
Results 1 to 3 of 3

disable close only use command button

  1. #1
    Registered User
    Join Date
    01-12-2012
    Location
    Staffordshire
    MS-Off Ver
    Excel 2010
    Posts
    38

    disable close only use command button

    I'm trying to stop the workbook from closing using the X or file close option
    I would like them only to use the command button
    but when I click the close button it prompts with the save dialog box yesnocancel, I do not want
    this is the code I'm using in the this workbook



    Please Login or Register  to view this content.
    I have tried this
    Please Login or Register  to view this content.

    but still shows this

    save.jpg


    any help would be good

  2. #2
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: disable close only use command button

    This should work:
    Please Login or Register  to view this content.
    This code must be pasted in ThisWorkbook

  3. #3
    Registered User
    Join Date
    01-12-2012
    Location
    Staffordshire
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: disable close only use command button

    that's what I'm using but doesn't work

+ 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. vba code to disable only close button and close through a button in Excel workbook
    By atif_ar in forum Excel Programming / VBA / Macros
    Replies: 47
    Last Post: 11-23-2014, 02:41 PM
  2. VBA Code to Disable Excel Close button also disabling my Close Button
    By akynyemi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-28-2013, 12:56 PM
  3. Disable close workbook but still force users to close thru command button
    By rathig in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2013, 07:29 AM
  4. Disable the 'x' close button on a VBA UserForm
    By LoveCandle in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-29-2009, 04:58 PM
  5. Hide or disable the 'Close' button
    By 5631 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2008, 12:36 PM
  6. Disable close button
    By mqdias in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-23-2007, 10:06 AM
  7. [SOLVED] How to disable a sheet's x(close) button?
    By Stefi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-06-2005, 09:06 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