Hi Guys,
So I've been struggling with this all day and reached the end of my knowledge as I know there must be a much simpler way of doing it ...
Aim
Save the current sheet as a seperate workbook with only values, formatting and images i.e. .xlsm to .xlsx (no macros or formulas) Whilst keeping current workbook open and close the newly saved one immediatley.
I have tried the SaveAsCopy function but you cant select the file type and i have tried to copy and paste as values&formatting to new workbook then save but I can't get the images to copy over at the same time as the cell values.
This is what I currently have, works as I want it to but images do not go over...
Sub TestSaveCopy_Backup()
' TestSaveCopy Macro
Application.CopyObjectsWithCells = True
Columns("A:E").Select
Selection.Copy
Workbooks.Open Filename:= _
Workbooks("TRR_Template.xlsm").Worksheets("Project Info").Range("B4").Value & "\XLSX Template.xlsx"
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:=Range("B2").Value & "" & Range("E9").Value & "-TRR-" & Range("E5").Value & "_" & Range("B5") & ".xlsx" _
, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveWindow.Close
End Sub
So I've been struggling with this all day and reached the end of my knowledge as I know there must be a much simpler way of doing it ...
Aim
Save the current sheet as a seperate workbook with only values, formatting and images i.e. .xlsm to .xlsx (no macros or formulas) Whilst keeping current workbook open and close the newly saved one immediatley.
I have tried the SaveAsCopy function but you cant select the file type and i have tried to copy and paste as values&formatting to new workbook then save but I can't get the images to copy over at the same time as the cell values.
This is what I currently have, works as I want it to but images do not go over...
Sub TestSaveCopy_Backup()
' TestSaveCopy Macro
Application.CopyObjectsWithCells = True
Columns("A:E").Select
Selection.Copy
Workbooks.Open Filename:= _
Workbooks("TRR_Template.xlsm").Worksheets("Project Info").Range("B4").Value & "\XLSX Template.xlsx"
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:=Range("B2").Value & "" & Range("E9").Value & "-TRR-" & Range("E5").Value & "_" & Range("B5") & ".xlsx" _
, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveWindow.Close
End Sub