Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

How to avoid warning pop-up dialog boxes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew - 23 May 2008 19:29 GMT
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
Kevin B - 23 May 2008 19:40 GMT
Using the following line of code at the top of the sub/function that deletes
the sheet:

   Application.DisplayAlerts = False

Signature

Kevin Backmann

> Hello,
>    I have a purchase order template which has a bunch on vendor
[quoted text clipped - 7 lines]
>
> thanks
Mike H - 23 May 2008 19:41 GMT
try

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

Mike

> Hello,
>    I have a purchase order template which has a bunch on vendor
[quoted text clipped - 7 lines]
>
> thanks
Andrew - 23 May 2008 20:56 GMT
> try
>
[quoted text clipped - 15 lines]
>
> > thanks

Thanks.  That worked just fine.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.