Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default How to avoid warning pop-up dialog boxes

Hello,
I have a purchase order template which has a bunch on vendor
information on sheet 2, while the actual purchase order form is on
sheet 1. I have a button on screen which is called "create PO". When
I press this button, the program re-names the worksheet as PO-
(addnumber), and then deletes the second sheet, which contains all of
the vendor information. So, when the program tries to delete sheet 2,
it sends a pop up dialog which requires the user to press OK or
Cancel. How can I have the program skip this pop up box?

thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,316
Default How to avoid warning pop-up dialog boxes

Using the following line of code at the top of the sub/function that deletes
the sheet:

Application.DisplayAlerts = False

--
Kevin Backmann


"Andrew" wrote:

Hello,
I have a purchase order template which has a bunch on vendor
information on sheet 2, while the actual purchase order form is on
sheet 1. I have a button on screen which is called "create PO". When
I press this button, the program re-names the worksheet as PO-
(addnumber), and then deletes the second sheet, which contains all of
the vendor information. So, when the program tries to delete sheet 2,
it sends a pop up dialog which requires the user to press OK or
Cancel. How can I have the program skip this pop up box?

thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default How to avoid warning pop-up dialog boxes

try

Application.displayalerts=false
your code to delete sheet
Application.displayalerts=True

Mike

"Andrew" wrote:

Hello,
I have a purchase order template which has a bunch on vendor
information on sheet 2, while the actual purchase order form is on
sheet 1. I have a button on screen which is called "create PO". When
I press this button, the program re-names the worksheet as PO-
(addnumber), and then deletes the second sheet, which contains all of
the vendor information. So, when the program tries to delete sheet 2,
it sends a pop up dialog which requires the user to press OK or
Cancel. How can I have the program skip this pop up box?

thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default How to avoid warning pop-up dialog boxes

On May 23, 12:41 pm, Mike H wrote:
try

Application.displayalerts=false
your code to delete sheet
Application.displayalerts=True

Mike

"Andrew" wrote:
Hello,
I have a purchase order template which has a bunch on vendor
information on sheet 2, while the actual purchase order form is on
sheet 1. I have a button on screen which is called "create PO". When
I press this button, the program re-names the worksheet as PO-
(addnumber), and then deletes the second sheet, which contains all of
the vendor information. So, when the program tries to delete sheet 2,
it sends a pop up dialog which requires the user to press OK or
Cancel. How can I have the program skip this pop up box?


thanks


Thanks. That worked just fine.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Avoid Update Links dialog in Excel 2003 Ian Chappel Links and Linking in Excel 3 June 29th 07 01:11 PM
How to avoid an error dialog justaguyfromky Excel Programming 2 February 18th 06 10:02 PM
avoid warning when removing sheet Tijmen Excel Programming 2 December 28th 05 03:10 PM
How to I Avoid the Auto-Email Security Warning Steve[_68_] Excel Programming 1 September 14th 04 05:15 PM
How-To suppress a warning dialog James Excel Programming 2 August 11th 04 08:36 PM


All times are GMT +1. The time now is 06:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"