add new sheet as copy of "Master" sheet (1 Viewer)

NMeeker

Registered User.
Local time
Today, 13:52
Joined
Feb 6, 2009
Messages
11
Hi, I have a workbook with a user form, most information in the workbook will be filled in using the form. However, the form references all visible worksheets many times. If the user adds a blank worksheet without specific ranges and headings built in, then the form will not work correctly. I need a way to force all new worksheets to have the same setup as my "Master" sheet, which is currently a blank worksheet with all the correct settings and headers. Any suggestions on how to force all new worksheets to be a copy of the Master sheet? or have the same setup as it?
 

NMeeker

Registered User.
Local time
Today, 13:52
Joined
Feb 6, 2009
Messages
11
I got it.. i'm a smart cookie... lol
I used, this code in the ThisWorkbook Module

Code:
Private Sub Workbook_NewSheet(ByVal Sh As Object)


Sheets("Master").Copy After:=Sheets(Me.Sheets.Count)

Sheets(Me.Sheets.Count).Visible = True

Sheets(Me.Sheets.Count).Name = "New Rope" & Format(Now(), "hhmmss")
Application.DisplayAlerts = False
Sh.Delete
Application.DisplayAlerts = True

End Sub
 

Users who are viewing this thread

Top Bottom