Can warning messages be suppressed in Excel?

J

JonWestcot

Hi all:

I'm wondering if certain warning messages can be suppressed or kept from
displaying in the following situations:

1) I create a new worksheet, copy some data into it, then delete the
worksheet. When I execute the Delete statement, a warning comes up to
confirm the delete. I don't need the warning; the creation and copying and
deletion are all happening under the covers, so to speak, and the user
couldn't care less what I'm doing to "make the magic" happen.

2) When I'm saving a file and using the SaveAs command, if the file
already exists, I get a warning that it's going to overwrite it. If the old
one is overwritten, I don't care, and neither do my users. They're used to
seeing only the latest and greatest file in the directory. If they start to
see these warning messages, they're going to get cranky.

Any suggestions on ways to avoid these pesky popup prompts will be
greatly appreciated!

Thanks!

Jon
 
M

Mike

Application.DisplayAlerts = False
'delete**************
Application.DisplayAlerts = True
 
K

Keith74

Try

Application.DisplayAlerts = false

might help, fraid i can't check at the moment, excel is busy :)
 
J

JonWestcot

Hi Mike:

Thanks! I looked through the Application object model but missed this
one. (Can't imagine how! It's not like there are very many methods and
properties from which to choose! <g>)

Jon
 
J

JonWestcot

Hi Keith:

Thanks -- you and Mike are on the same wavelength.

The info is much appreciated!

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top