Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress warning dialog box with Excel delete method 1

Status
Not open for further replies.

VogonPoet

Programmer
Apr 9, 2001
116
US
I have an Access(2000) program that is doing some manipulation to Excel(2000) workbooks. When I execute the following command, I get a dialog box asking me to confirm the deleteion:

objWkbk.Worksheets(intCnt).Delete

How can I temporarily disable the dialog box asking me to confirm the delete?

Thanks in advance,
Michael
 
Off the top of my head, I believe you use

Docmd.SetWarnings False

objWkbk.Worksheets(intCnt).Delete

Docmd.SetWarnings True Mike Rohde
"I don't have a god complex, god has a me complex!"
 
Thanks for the idea, but I've already tried that and it didn't work.

Micahel Hodes
 
Try the following on the excel.application object:

objExcel.DisplayAlerts = False

That should set you up for deleting without the popup. Then just set it back to true when you are done.

Hope this helps............
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top