Melina,
To ensure there is no VBA code in the new book, just save it as a .xlsx file. The following could should accomplish what you're looking for:
Sub SaveAsMacro_for_MelinaT()
Dim strSavePath As String: strSavePath = Environ("UserProfile") & "\Desktop\"
Dim strSaveName As String: strSaveName = "Macro Free File (Test)"
Dim sShtName1 As String: sShtName1 = "Test 1"
Dim sShtName2 As String: sShtName2 = "Test 2"
Dim sShtName3 As String: sShtName3 = "Test 3"
Dim sShtName4 As String: sShtName4 = "Test 4"
Dim wbActive As Workbook: Set wbActive = ActiveWorkbook
Dim wbNew As Workbook: Set wbNew = Workbooks.Add
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim i As Integer
For i = wbNew.Sheets.Count To 2 Step -1
wbNew.Sheets(i).Delete
Next
wbActive.Sheets(Array(sShtName1, sShtName2, sShtName3, sShtName4)).Copy After:=wbNew.Sheets(1)
wbNew.Sheets(1).Delete
wbNew.SaveAs Filename:=strSavePath & strSaveName & ".xlsx", _
FileFormat:=xlOpenXMLWorkbook
wbNew.Close False
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Hope that helps,
~tigeravatar
Bookmarks