Hy all,
I made a script that copy's a sheet, strip is down to value's only and save it. But because of een script running from this sheet whit a userform.show i run in a error.
Is there a better way to copy a sheet values only to a new workbook?
Dim wb As Workbook
Set wb = Workbooks.Add
Application.CopyObjectsWithCells = False
ThisWorkbook.Sheets("Invulblad").copy Before:=wb.Sheets(1)
Sheets(1).Name = "LAB_Invulblad"
With ActiveSheet.UsedRange.Cells
.Value = .Value
.ClearFormats
End With
Application.CopyObjectsWithCells = True
On Error Resume Next
wb.SaveAs "C:\Users\berry\Google Drive\PKB 2D\PKB data bestanden\PKB lab upload\LAB_data.xlsx"
On Error GoTo 0
Workbooks("LAB_data.XLSX").Close
Bookmarks