+ Reply to Thread
Results 1 to 5 of 5

deleting a worksheet (no prompting) and closing workbook

Hybrid View

  1. #1
    Registered User
    Join Date
    04-22-2010
    Location
    Greece
    MS-Off Ver
    Excel 2007
    Posts
    50

    deleting a worksheet (no prompting) and closing workbook

    hey all
    first,

    what is the code I use when the [x] button is pushed.
    is it like private sub form_closed??? - dont think it is

    when the user puses the [x] (top right hand corner. I want to code an action.
    is this possible?


    i know you a form is opened the code is
    form_activate

    2nd
    when i use the following command
    Sheets("Temp").Delete

    it will prompt me if i am sure i want to delete. I do not want to be prompted.

    cheers
    Last edited by pavlos; 05-15-2010 at 05:13 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: deleting a worksheet (no prompting) and closing workbook

    Application.DisplayAlerts = False
    Sheets("Temp").Delete
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    04-22-2010
    Location
    Greece
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: deleting a worksheet (no prompting) and closing workbook

    thanks

    i only want it to not display alerts if clicking the x button
    any idea?

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,526

    Re: deleting a worksheet (no prompting) and closing workbook

    Are you referring to a UserForm?
    Or when closing a Workbook?

  5. #5
    Registered User
    Join Date
    04-22-2010
    Location
    Greece
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: deleting a worksheet (no prompting) and closing workbook

    user form
    the [x] button on the user form.

+ 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