Hey all. I've written a method to copy a worksheet that contains a couple of command buttons at the top of it. The sheet is copied fine, but the command buttons and a text box at the top of the sheet won't copy. I experimented with adding a dummy sheet and button, and recording copying them. I see that the add button is grabbed in the macro, but not when I record copying my sheet of interest. Any ideas? Here's the code:
Code:
Sub NewAccountManagerSheet(SheetName As String, AccountManager As String, Area As String)
Dim shName As String
shName = SheetName & "-MA" ' "for manager area."
Sheets("AccountManagerTemplate").Unprotect
Sheets("AccountManagerTemplate").Copy Before:=Sheets(2)
Sheets("AccountManagerTemplate (2)").Name = shName
Sheets(shName).Range("AccountManager") = AccountManager
Sheets(shName).Range("Area") = Area
Sheets(shName).Activate
Sheets(shName).Protect DrawingObjects:=False, Contents:=True, Scenarios:=False
End Sub
Last edited: