Wednesday, July 6, 2016

[Solution] Automating responses to Excel message boxes within a macro

Automating responses to Excel message boxes within a macro

Hello there.
I have recorded a macro in Excel; one of the actions included in the macro is to delete a sheet within the workbook.  When I run the macro I am getting an excel message box saying:
'Data may exist in the sheet(s) selected for deletion.
To permanently delete the data, press Delete'
This text is followed by a 'delete' button and a 'cancel' button.
The macro will not continue to run until the user clicks the button.
I need a piece of code to insert into the macro at this point so that the worksheet is automatically deleted, without the user having to click the 'delete' button.
Could anybody help please?  Many thanks

Solutions to the Problem Automating responses to Excel message boxes within a macro

Download SmartPCFixer to Fix It (Free)

Try
  Application.DisplayAlerts = False
before you delete the sheet and
  Application.DisplayAlerts = True
after.
Andreas.

To install drivers and other optional updates

  1. To install optional updates, you need to review and then select them from the list of updates that Windows finds for your computer. Optional updates are not installed automatically.
  2. Open Windows Update by clicking the Start button Picture of the Start button, clicking All Programs, and then clicking Windows Update.
  3. In the left pane, click Check for updates, and then wait while Windows looks for the latest updates for your computer.
  4. If any updates are found, click View available updates.
  5. Select the optional updates that you want, and then click Install. Administrator permission required If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

Recommended Method to Fix the Problem: Automating responses to Excel message boxes within a macro:

How to Fix Automating responses to Excel message boxes within a macro with SmartPCFixer?

1. Click the button to download SmartPCFixer . Install it on your computer.  Run it, and it will scan your system. The errors will be shown in the scan result.

2. After the scan is finished, you can see the errors and problems which need to be repaired.

3. The Fixing part is finished, the speed of your computer will be much higher than before and the errors have been removed.


Related: AMD Radeon HD 7800M Win8 not working [Anwsered],I can access the internet, get on facebook and get to hotmail, but I can't play games on facebook and I can't open or respond to my e-mails,I keep getting this Media Player error when I log on my computer. [Anwsered],[Anwsered] System Hanging on shutdown and restart,Unable to get the Vlookup property of the WorksheetFunction class,Solution to Error: Error: "0x81000032 make sure the C: drive is online and set to NTFS" when trying to backup to external hard drive.
,Troubleshoot:External Hard Drive not listed in Windows 7 backup wizard Error
,I'm always being signed off so annoying Tech Support
,Solution to Problem: Impossible to use Internet Explorer! I keep getting the same error message every time i try to use IE.
,Solution to Problem: Referencing data in another file
,Troubleshoot:Error: "0x81000032 make sure the C: drive is online and set to NTFS" when trying to backup to external hard drive. Error,External Hard Drive not listed in Windows 7 backup wizard Tech Support,Tech Support: I'm always being signed off so annoying,Solution to Problem: Impossible to use Internet Explorer! I keep getting the same error message every time i try to use IE.,Referencing data in Access using Excel [Anwsered],Need Best Way To Present Data [Anwsered],Same question but for windows 7 home edition,sometimes fullscreen won't activate [Solved],Solution to Error: We bought a new computer with windows 7 and it is constantly freezing. How do we fix this?,Solution to Error: Windows 8 update crash (2013-07-22)
Read More: Auto double click Tech Support,back up and restrore page for vista fails to load [Anwsered],Troubleshooting:Audio error code 10 on the computer. Error,Troubleshoot:Are there some best practices concerned to the partitioning of the disks using windows 7?,[Anwsered] aura has stopped working,application not found error,any problems in a team where one has Windows XP and the other has Windows 7?,Application/Object-Defined Error,An Excel formula question where hours are totalled and cumulating,Anyone know the hardware email?

No comments:

Post a Comment