View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Password protect the worksheet Template.

Then unprotect the copy:

Option Explicit
Sub NewForm2()
Sheets("Template").Copy After:=Sheets(1)
ActiveSheet.Unprotect Password:="hi"
End Sub




???? wrote:

I have a worksheet that the first tab is the template named "Template", what
I want to happen is I have a command button on the form called "New Entry"
which copies the tab and makes "Template (2)" but thinking ahead some people
may forget to hit the command button and start entering into the original
template.
I tried to just lock the sheet but then the lock carries over to the copied
template.

My current code is:

Sub NewForm()
Sheets("Template").Select
Sheets("Template").Copy After:=Sheets(1)
End Sub

Could I add some code at the end to tell the copy to unprotect?

Thanks!!
Stacey


--

Dave Peterson