Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default disable warning messages?

I have written a few macro's recently that take the output from Access
queries and copy the data into template spreadsheets. Depending on how large
a block of data is copied the user might get a warning about keeping the data
available to other applications on the clipboard...also get a warning when
the macro deletes some sheets from the workbook.

In Access I can turn these sorts of warnings on an off. Is there a similar
way to prevent these "breakpoints" where the user has to input a choice?

TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default disable warning messages?

Please disregard...figured it out!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default disable warning messages?

Yep!

Application.DisplayAlerts = False

....your code

Application.DisplayAlerts = True

This will only disable workbook-related dialogs (Save / Discard, etc).
Errordialogs generated because of misprogramming etc require a more
solid error handling. Try googling "error handling syntax vba"
Manual Man

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default disable warning messages?

Hi,

Had some problems posting this one, hope there aren't 2 answers. This
does the trick

Sub something()
Application.DisplayAlerts = False
-- some code
Application.DisplayAlerts = True
End Sub

Note: This will only prevent the usual Excel dialogs from appearing.
Error dialogs generated from VBA because of misprogramming should be
catched by more solid error handling (try "error handling syntax vba"
on google)

Regards,
ManualMan

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
Help please - warning messages adickson Excel Worksheet Functions 1 May 23rd 09 02:05 PM
Help please - warning messages adickson Excel Worksheet Functions 1 May 23rd 09 12:26 PM
Warning Messages fabio Excel Worksheet Functions 3 October 15th 08 10:54 AM
Playing .wav files (why do a few cause warning messages?) Cybert Excel Programming 0 October 19th 04 09:38 PM
Getting rid of warning messages Joel Wiseheart Excel Programming 2 November 11th 03 08:32 PM


All times are GMT +1. The time now is 05:48 PM.

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"