Say "yes" to "OK"

  • Thread starter Thread starter pgarcia
  • Start date Start date
P

pgarcia

I have the following:
Sheets("Quick Search").Delete

But it keep asking me if want to permantly delete the sheet and I have to
click on the "OK" to processed. What is the VB code that I need to not have
that ask me the quesiton, just delete it?

Thanks
 
try

application.displayalerts = false
Sheets("Quick Search").Delete
application.displayalerts = true
 
pgarcia said:
I have the following:
Sheets("Quick Search").Delete

But it keep asking me if want to permantly delete the sheet and I have to
click on the "OK" to processed. What is the VB code that I need to not
have
that ask me the quesiton, just delete it?

Thanks

Application.DisplayAlerts = False

Just remember to set it = True again after delete.

Regards,

Per
 
application.displayalerts = false
Sheets("Quick Search").Delete
application.displayalerts = true
 
You can use this

Application.DisplayAlerts = False
'your code
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

Back
Top