Confirm Delete in a macro

In a macro that I am using, I need to delete a sheet. When I record the macro and then replay it, it brings up the confirmation dialog again. How can have the macro automatically confirm deletion of the sheet.
0
anonymous (74727)
6/7/2004 9:01:05 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
444 Views

Similar Articles

[PageSpeed] 19

Tim

Sub test()
Application.DisplayAlerts = False
Sheets("Sheet1").Delete
Application.DisplayAlerts = True
End Sub


-- 
XL2002
Regards

William

willwest22@yahoo.com

"Tim" <anonymous@discussions.microsoft.com> wrote in message
news:91B90638-1833-4D53-9440-6EC94D3D598E@microsoft.com...
| In a macro that I am using, I need to delete a sheet. When I record the
macro and then replay it, it brings up the confirmation dialog again. How
can have the macro automatically confirm deletion of the sheet.


0
willwest22 (109)
6/7/2004 9:06:33 PM
Tim

Application.DisplayAlerts = False
' your code
Application.DisplayAlerts = True


Regards

Trevor


"Tim" <anonymous@discussions.microsoft.com> wrote in message
news:91B90638-1833-4D53-9440-6EC94D3D598E@microsoft.com...
> In a macro that I am using, I need to delete a sheet. When I record the
macro and then replay it, it brings up the confirmation dialog again. How
can have the macro automatically confirm deletion of the sheet.


0
Trevor9259 (673)
6/7/2004 9:06:44 PM
Reply:

Similar Artilces:

Deleting employees
We loaded employees into Great Plains with e-connect 8.0.2.1 using taCreateEmployee and taCreateEmployeeAddress. I need to wipe this data out and re-load. I know that with the new version of e-connect there is a taDeleteEmployee but for now can someone tell me the tables I need to truncate out in order to re-run the taCreateEmployee and taCreateEmployeeAddress? thanks -- AHIhelp AHIhelp: The tables are listed below - these are the ones handled by the Employee Delete procedure so I would assume these are the ones you would need to manually handle now as well UPR00100 UPR00102 UPR00...

Delete Query Error
I'm trying to execute the delete query below, but Access keeps giving me an error that it "Could not delete from specified tables". It looks as though it might have something to do with the write access, but I know I've opened up the database for both read/write access. I've created/imported all tables myself. I'm not connected via ODBC at all. Does anyone have any suggestions? DELETE Daily_Scrubbed.* FROM Daily_Scrubbed INNER JOIN Daily_Scrubbed_Dupes ON Daily_Scrubbed.CHD_ACCOUNT_NUMBER = Daily_Scrubbed_Dupes.CHD_ACCOUNT_NUMBER; Try DELETE DISTINCTROW Dail...

need help with macros
Hello folks. Cant say that I know much about macros. I am a computer support technician trying to help someone who also does not have a strong understanding of macros. I'll get right to it. The way this was explained to me was that a macro was created in excel file #1. I am told that (and I have observed this) when you open excel file #1 and excel file #2 (no macro created in #2) and then go back to file #1 and click tools > macro > macros you should see the name of the macro created already there and you should just be able to click the "run". But the name of the ma...

Delete Templates?
Is there a way to edit the file containing the MP 2007 templates so I can delete all those that I will never use? Thanks - Dave Except for those you create yourself, the templates are in a folder similar to this: C:\Program Files\Microsoft Office\Office12\PUBWIZ I don't know if you can delete them without consequences. You might try renaming one (.POC) to somthing.old and see what happens. -- Mary Sauer http://msauer.mvps.org/ "djmccartney" <djmccartney@discussions.microsoft.com> wrote in message news:04DB1790-6F64-4935-B5D4-DCD8DA571550@microsoft.com... > Is t...

Deleted items not showing up in Recovered Deleted Items
Outlook 2000 Client; Exchange 5.5 Server When I dlete an email , it show up in deleted items. When I delete it from there it doesn't show up in Recovered Deleted Items folder. WHY Not using Shift + Delete when deleting and no changes were made to the Exchange server regarding Item Recovery. Any Ideas? You need to enable DumpsterAlwaysOn in the registry. http://support.microsoft.com/default.aspx? scid=http://support.microsoft.com:80/support/kb/articles/Q1 78/6/30.ASP&NoWebContent=1 Patrick Rouse Microsoft MVP - Terminal Server >-----Original Message----- >Outlook 2000...

Creating a print-macro that'll only print page 1?
Hi, I have a spreadsheet that contains multiple sheets. I want to add a button that runs a macro, which only prints page 1 on the first sheet (called Scorekort). The "Scorekort" sheet contains 13 pages in total, but I only want to print the first page. Any ideas for this macro? Anders hi, Sub Macro1() Sheets("Scorekort").PrintOut From:=1, To:=1, Copies:=1, Preview:=True, Collate:=True End Sub if you don't want a print preview, Preview:=False -- isabelle Le 2011-05-21 04:16, Anders M a �crit : > Hi, > > I have a spreadsheet that contains multiple ...

macro to continue running if error
Hi, I have the following macro that is working fine. It is looking at a specified worksheet array and executing the macro "Filter" on each worksheets. However, in case one of the worksheet is not existing, I would like the macro to pass the non existing worksheet and continue running on the next available worksheet. I tried adding the following statement: "On Error Resume Next" at the beginning but it is passing everything. Any help would be appreciated. Thanks Sub UpdateAll() For Each sh In Worksheets(Array("1", "2", "3", ...

reading confirmation
Good day, I have a problem with outlook. When they send a message to me that demands the shipment of a reading confirmation, even if I accept, the reading confirmation does not come received from the sender. Someone knows from what depends and in which way I can resolve the problem? Thanks for the eventual answers. Niki In news:eht7fo$251$1@fata.cs.interbusiness.it, Niki <nicola.pantaleo@yahoo.it> typed: > Good day, > > I have a problem with outlook. When they send a message to me that > demands the shipment of a reading confirmation, even if I accept, the > read...

Can not get Excel macros to save chart format -lost in space!
Help??? I've been searching this forum for 5 days trying to find a problem similar to what I am having without any luck. I have been trying to use Excel macro to record the creation, formating and saving of a simple bar chart against my Excel data range but the macros do not run for the chart. I am able to creat the charts okay but the macro craps out when I run it. I keep getting " Set ActiveChart = ActiveSheet.ChartObjects(Chart1)" type errors as if it's not recognizing the chart that I just made. I am an advanced Excel person BUT not so with VB coding. ...

Auto-start Macro
I have a simple macro in Word 2003. How can I make it automatically run everytime I start Word? Thanks in advance. What does the macro do? It may be sufficient to re-name the macro AutoExec -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<> "Frank" <Frank@gmail.co...

Cascade Delete and N:N Join Tables
I'm revising the schema for an app I've just taken over and most of the N:N tables don't have unique indexes defined on the pair of foreign keys (so they have lots of duplicate records), but the FK relationships are all set as CASCADE DELETE (and, unnecessarily, CASCADE UPDATE, since all the FKs values are from Autonumber fields, which can't be updated, of course). Anyway, my tendency is to *not* set CASCADE DELETE on join tables, because I'm never quite sure if the way *I* see the hierarchy is the way Jet sees it. That is, I may think that something is the paren...

How to delete rows
I have a work sheet that has many rows like this and 3 coloums 1 chair custom 24 2 table custom 0 3 spoon custom 3563 4 hat custom 0 now I would like to make another colom and only extract those that their sum is greather than zero. in other words I would like to delete rows 2 and 4 how can i do that using if-function or any other function tnx khers If you have many rows, first sort the data by the numeric field. This will gather all the zeros together and the rows can be deleted with on...

How to delete a drawing in a Note
Using Outlook 2003 (latest updates), with Win XP SP1 (latest updates). I'm not sure how, but accidentally there is a drawing in one of my Outlook Notes, a squiggle. I cannot seem to delete that drawing from the note. I select it, press the delete button on my keyboard, the drawing is still there. How do I get rid of that? " MS" <ms@nospam.com> wrote in message news:uRiOmWzBGHA.532@TK2MSFTNGP15.phx.gbl... > Using Outlook 2003 (latest updates), with Win XP SP1 (latest updates). > > I'm not sure how, but accidentally there is a drawing in one of my Outlook &...

Outlook Read Receipt cannot be sent and cannot be deleted
I replied to a read receipt request on an email account without an outgoing server. Now every time I check my email I get an error message. The read receipt is not in my outbox so I cannot delete it? Do you have any other means of accessing your mailbox besides Outlook (id est Outlook Web Access for Exchange Server, Web-mail access)? Most ISPs provide an alternate means of access ing your mailbox. You may be able to delete the errant message from there. -- PATRICK REED [Outlook - MVP]~~~~~~ -Microsoft Certified Professional (MCP) -Have you checked http://www.slipstick.com? -Ple...

How to search user mailbox store
Everyone, I am a relatively new Exchange Server administrator. It's running on a Windows 2003 server and client workstations are running Outlook. I have a request from my manager to be able to view folders of other users, including deleted items. We're trying to identify messages from a specific external user that could result in a security breach, and we don't want the users to be aware of this. The only thing I knew to do was to assign him Full rights in Active Directory to each user's mailbox. After doing this, I had him click File, Open, Another user's mailbox, and...

Confirm before sending?
I have a client that accidentally sends e-mails before completing them on a regular basis. They would actually like confirmation before sending any e-mail. I found this reference for VB code but I don't know how to edit or apply it as I know NOTHING about VB - Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim intRes As Integer Dim strMsg As String strMsg = "Do you really want to send this message?" intRes = MsgBox(strMsg, vbYesNo + vbDefaultButton1, "Confirm Send ") If intRes = vbNo Then Cancel = True End If End Sub ...

how do i delete a file from recent documents file in excel
can anyone help how do i delete a heading from recent documents file i have deleted figures from actual page but cannot get heading to go iknow how to do with xp but not with vista many thanks XP and Vista are MS Operating Systems. This is an MS Office Excel news group. Are you sure you want to be here? If you mean the recently used file list in Excel 2007 Office Button>Excel Options>Advanced>Display Change Show recent documents list to 0 and OK All recent documents are gone. Go back in and change back to whatever you want. Gord Dibben MS Excel MVP On Fri, 6 Mar 2009 08:...

How to delete inbox messages
How can delete many messages all at once? I dont see anymore the box i used before to click many messages at once.Using Win 7. I'm not sure what box you are referring to, but...... To delete all: Highlight one and Ctrl + A will highlight them all. - Delete. To delete a section: Highlight the first one you want to delete. Scroll down to the last one and click on it while holding the Shift key down. - Delete. To delete multiple messages that are interspersed: Hold down the Ctrl key while you click on each message to highlight. - Delete. -- Bruce Hagen ...

Move confirm
How do I get Vista to not move file without confirmtion??? Have moved files by mistake! -- palm32 ------------------------------------------------------------------------ palm32's Profile: http://forums.techarena.in/members/59496.htm View this thread: http://forums.techarena.in/vista-help/1336786.htm http://forums.techarena.in On Thu, 13 May 2010 13:15:03 -0500, palm32 <palm32.4awypb@DoNotSpam.com> wrote: > >How do I get Vista to not move file without confirmtion??? >Have moved files by mistake! How did you manage " by mistake " ? ...

Assign Macros to Toolbar Problem
I have a large spreadsheet that I have added a toolbar and menu to with macros for navigation. The problem occurs when I change the name of the spreadsheet I am using from workjune.xls to workjuly.xls. All of the macros on the toolbar and menu still refer to the macros in the old file not the new one. Is there any way of assign the macros without the filename so that it always looks for the macro in the current file. Any ideas would be greatly appreciated. Neil, If you have the file open in Excel and use Save As to change the name it should update the tollbar links to the new name. If y...

Recycle Bin confirm message
I have several W98SE machines. One of them operates normally but has been used for trial installs, and therefore had "moderate" registry cleaning. On this machine, Recycle Bin/Properties, the "show confirmation on delete" message is *unchecked*. But on this machine, I still get the confirm message. I want to stop the confirm message. Is there an area of the Registry to be examined for this? Or, how else to stop it? ms check Display delete Confirmation dialog box.... Apply ....Ok>>> Restart Now unchecked....... Apply..... Ok.......Restart it s...

New Excel user needs help with simple Macro...
Hello, I am relatively need to Microsoft Excel and I need help creating a simple Macro. I would like to create a Macro that will: - take the value of the selected value - add it to the value of the cell below it - if the sum of these two cells is zero - replace values of both cells with an x - move to the next set of cells in the same column repeat the procedure - continue the procedure for the entire column - once that is done, for each cell with an x delete the entire row the reason why I do not wish to delelte the rows on the fly is because it is possible that after a deletion of a pai...

How to recall and delete a particluar message..
Hello, I have Exchange 2003. Is there a way to recall an email and delete it from everyone's mailbox? I know there is the recall function in outlook however I have already tried this and it doesn't seem to recall messages that have already been opened. Is there a way through ESM maybe that can search for this email then I have the option to delete it. The message has gone to about 100 users. Thanks TKE402 On Tue, 9 Aug 2005 13:27:01 -0700, TKE402 <TKE402@discussions.microsoft.com> wrote: >Hello, > >I have Exchange 2003. Is there a way to recall an email and de...

Deleting mail?
Is there any way to globally set or mail store option for a mail retention policy in Exchange? I've been using Mailbox Manager settings to do it because of the way our org was setup but that's been cleaned up and I was hoping for a better option. On Mon, 15 May 2006 18:34:01 -0700, Dan <Dan@discussions.microsoft.com> wrote: >Is there any way to globally set or mail store option for a mail retention >policy in Exchange? I've been using Mailbox Manager settings to do it >because of the way our org was setup but that's been cleaned up and I was >hoping...

GP8
Hello. I am trying to delete items at a specific site, and then delete the site. I am down to my last item !! :) ... and get the following message: This item/site record can't be deleted because an unposted trx exists for this item at this site. I cannot find this trx !! Would anyone have some suggestions as to where to search? What SQL table(s) to query? (I'm thinking it may be a 'broken' trx and will try to run checklinks and reconcile if/when I can get users off the system). Thx in advance. M. other things to check, purchase orders, PO Receiving transaction, sale...