I have the following macro. It saves the "current workbook" as a different name without macro.
Sub Copy()
Dim WS As Worksheet
Dim i As Integer
Dim sarrWS() As String
ReDim sarrWS(1 To ThisWorkbook.Worksheets.Count)
i = 0
For Each WS In ThisWorkbook.Worksheets
i = i + 1
sarrWS(i) = WS.Name
Next WS
ThisWorkbook.Worksheets(sarrWS()).Copy
Application.Dialogs(xlDialogSaveAs).Show
End Sub
It works fine. But I need 2 special features.
1) The macro doesn’t copy sheet s “Stock” and “Results”. The other sheets must be copied.
2) Copied and saved new workbook sheets do not have to sheets password. (Original workbook sheets protected by a password.
How can be modified this macro?
Sub Copy()
Dim WS As Worksheet
Dim i As Integer
Dim sarrWS() As String
ReDim sarrWS(1 To ThisWorkbook.Worksheets.Count)
i = 0
For Each WS In ThisWorkbook.Worksheets
i = i + 1
sarrWS(i) = WS.Name
Next WS
ThisWorkbook.Worksheets(sarrWS()).Copy
Application.Dialogs(xlDialogSaveAs).Show
End Sub
It works fine. But I need 2 special features.
1) The macro doesn’t copy sheet s “Stock” and “Results”. The other sheets must be copied.
2) Copied and saved new workbook sheets do not have to sheets password. (Original workbook sheets protected by a password.
How can be modified this macro?