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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turning off alerts

Status
Not open for further replies.

cmz21

Programmer
May 5, 2005
110
US
Hello,
I have created a macro in access which runs an access sql statement, puts the results in an excel sheet and saves the workbook. when my code tries to delete the excess worksheets, I get a messagebox asking to confirm the delete. I would not like to get this.
I tried using the code Application.DisplayAlerts = False, but when I try to run the macro, I get an error saying - "Method or Data member not found".
Is this the wrong snippet to use in this circumstance?

Thanks in advance.

cmz
 
Replace this:
Application.DisplayAlerts = False
By something like this:
yourExcelAppObj.DisplayAlerts = False

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
that's the ticket......
I figured it was something simple that I was missing. I kept trying activeworkbook.alerts, but that didn't work.

thanks for your help.

cmz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top