ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Skipping confirm (https://www.excelbanter.com/excel-programming/323740-skipping-confirm.html)

Greg[_19_]

Skipping confirm
 
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



Tom Ogilvy

Skipping confirm
 
application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True

--
Regards,
Tom Ogilvy

"Greg" wrote in message
...
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





Greg[_19_]

Skipping confirm
 
Thankyou again

Greg




All times are GMT +1. The time now is 04:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com