I'm creating a workbook with 5 identical tabs for data entry in a production facility. each tab represents a different production line. With some help from the macro recorder i've created a macro to make 4 clones of my main tab every time the workbook is opened. This helps save me time in having to distribute updates across the 4 other tabs when they occur. The macro works fine (although if anyone knows a simpler way of writing it I'd love to know it) except that after each worksheet is deleted a message box pops up that says:
I'd like to bypass this if possible so that my users don't have to go through 4 of these each time they open the work book. Does anyone know if / how this can be accomplished?Data may exist in the sheet(s) selected for deletion. To permanently delete the data, press Delete.
Thank you!
![]()
Private Sub Workbook_Open() Sheets("Sheet1 (5)").Select ActiveWindow.SelectedSheets.Delete Sheets("Sheet1 (4)").Select ActiveWindow.SelectedSheets.Delete Sheets("Sheet1 (3)").Select ActiveWindow.SelectedSheets.Delete Sheets("Sheet1 (2)").Select ActiveWindow.SelectedSheets.Delete Sheets("Sheet1").Select Sheets("Sheet1").Copy After:=Sheets(1) Sheets("Sheet1").Select Sheets("Sheet1").Copy After:=Sheets(2) Sheets("Sheet1").Select Sheets("Sheet1").Copy After:=Sheets(3) Sheets("Sheet1").Select Sheets("Sheet1").Copy After:=Sheets(4) End Sub
Bookmarks