C
Ctech
This macro is to copy a wb, sheet by sheet into a new blank wk, without
formulas.
I doing this as each page have several formulas and are sheet
protected.
What happens is that the macro so everything correct, except that it
pasts blank sheets.
Please help
Macro:
Sub Copywkbookvalues()
Dim Morg
Dim Mto
Dim tWbk As Workbook
Dim cWbk As Workbook
Dim Sht As Worksheet
Set tWbk = ActiveWorkbook
Workbooks.Add
ActiveWorkbook.SaveAs Filename:= _
"X:\Users\Shared\GENERAL\Christian S\05.11.23 - Budget
Uploading LBUD3\BFR\Copy of file.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Set cWbk = ActiveWorkbook
On Error Resume Next
tWbk.Activate
For Each Sht In Worksheets
Sht.Select
Sht.Cells.Select
Selection.Copy
cWbk.Sheets.Add
ActiveSheet.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Next
End Sub
formulas.
I doing this as each page have several formulas and are sheet
protected.
What happens is that the macro so everything correct, except that it
pasts blank sheets.
Please help
Macro:
Sub Copywkbookvalues()
Dim Morg
Dim Mto
Dim tWbk As Workbook
Dim cWbk As Workbook
Dim Sht As Worksheet
Set tWbk = ActiveWorkbook
Workbooks.Add
ActiveWorkbook.SaveAs Filename:= _
"X:\Users\Shared\GENERAL\Christian S\05.11.23 - Budget
Uploading LBUD3\BFR\Copy of file.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Set cWbk = ActiveWorkbook
On Error Resume Next
tWbk.Activate
For Each Sht In Worksheets
Sht.Select
Sht.Cells.Select
Selection.Copy
cWbk.Sheets.Add
ActiveSheet.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Next
End Sub