Skipping confirm

G

Greg

I have in my workbook a button which does everything i want delete the
hyperlink but when it comes to removing the sheet I want it asks meto
confirm

How do I avoid this pop-up

Here is the code I have so far

Private Sub CommandButton1_Click()
Sheets("TITLE PAGE").Select
Range("A5").Select
Selection.Delete Shift:=xlUp
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("PRIVATE INSURANCE").Select
ActiveWindow.SelectedSheets.Delete
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("TITLE PAGE").Select
ADDCLIENT3.Hide
ADDCLIENT2.Show

End Sub

Thanks in advance

Greg
 
T

Tom Ogilvy

application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
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