Warnings in Excel

G

Guest

Can someone please tell me how to turn off warnings in Excel VBA in the way
you would do this in Access?
DoCmd.SetWarnings False

Whenever the code closes a workbook, the prompt is displayed saying I've
pasted a large amount of data to the clipboard, etc. and this needs to be
part of an automated process.

Also how would you trigger a macro to run when a particular workbook is
opened?

Thanks in advance,
 
S

semiopen

Glenn said:
Can someone please tell me how to turn off warnings in Excel VBA in the way
you would do this in Access?
DoCmd.SetWarnings False

Whenever the code closes a workbook, the prompt is displayed saying I've
pasted a large amount of data to the clipboard, etc. and this needs to be
part of an automated process.

Also how would you trigger a macro to run when a particular workbook is
opened?

Thanks in advance,

Try

Application.DisplayAlerts = False

That should take care of most (all?) such prompts
 
G

Guest

Make sure you turn them back on again when you close the workbook.


application.displayalerts = true
 

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