+ Reply to Thread
Results 1 to 3 of 3

Can VBA Auto-select a choice from a dialog box?

  1. #1
    Registered User
    Join Date
    07-18-2008
    Location
    CT
    Posts
    3

    Can VBA Auto-select a choice from a dialog box?

    I need VBA to delete some worksheets as part of a macro but it asks me if I'm sure I want to delete (because data will be permanently lost). How can I "force" my answer to be yes, delete the sheets?

    Dialog text is: "Data may exist in the sheet(s) selected for deletion. To permanently delete the data, press delete."

    Dialog box choices are: "Delete" and "Cancel"

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Hi Chad, welcome to the forum.

    You can certainly do this, but remember - it's not always safe to automatically delete things. The example below should provide you with the information you need:
    Please Login or Register  to view this content.
    Sheet2 will be gone faster than you can say "$#!*% Microsoft!!"

  3. #3
    Registered User
    Join Date
    07-18-2008
    Location
    CT
    Posts
    3
    Thanks - worked like a charm

+ 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. Auto select in a drop down box
    By aidang in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-19-2013, 10:19 AM
  2. Select Case Statement
    By Gos-C in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-13-2008, 09:34 AM
  3. Replies: 1
    Last Post: 05-24-2007, 12:37 PM
  4. Variable Command Statment w/ Select Case
    By mpeplow in forum Excel General
    Replies: 1
    Last Post: 04-06-2007, 05:49 PM
  5. AUTO FILL Problem
    By test1986 in forum Excel General
    Replies: 3
    Last Post: 09-20-2006, 03:55 AM

Tags for this Thread

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