(Solved) – Save two specific worksheets in a new workbook without formulas but keeping the design

  • by
(solved)-–-save-two-specific-worksheets-in-a-new-workbook-without-formulas-but-keeping-the-design

I’ve got a workbook where I am creating a button that allows to save two specific sheets without formula’s (the purpose being that the sheets are going to be send to partners and costumers). I would like the sheets to be saved in a single document somewhere on my computer, and still have the current “design” with colors, setup etc.

I’ve currently written this code, which does everything that I’ve described, except deleting the formulas…

Sub SaveAsValues()
Dim ws As Worksheet

Worksheets(Array("frontpage", "mobile")).Copy After:= ws.Worksheets

With ActiveWorkbook
.SaveAs Filename:= "C:XXXX" & "NAME", FileFormat:= xlOpenXMLWorkbook
.Close savechanges = False
End With
End Sub

A bonus question is, that I’m experiencing that I cannot use spaces when defining the worksheets in the 3rd line of the code.. How do I fix this?

Hope you can help 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *