Hello,
I have the workbook with macros. Workbook structure is: Sheet1 where calculations are made and Sheet2, which is static and is used for keeping variables used for calculations in Sheet1.
In Sheet1 I'm using customized functions/formulas in few different ranges.
I made a button which runs 'copy1' Sub. That sub is saving whole workbook in specified folder and with specified name.
copy1 code:
What I'm trying to get is:
1). Copy whole Sheet2 into new workbook as it is.
2). From Sheet1 copy ranges A1:E22 and A26:C27 as values into new workbook.
3). From Sheet1 copy ranges A23:E24 and A28:C28 with functions/formulas.
4). Do that when button is clicked.
Could anyone can assist me with this one?
I have the workbook with macros. Workbook structure is: Sheet1 where calculations are made and Sheet2, which is static and is used for keeping variables used for calculations in Sheet1.
In Sheet1 I'm using customized functions/formulas in few different ranges.
I made a button which runs 'copy1' Sub. That sub is saving whole workbook in specified folder and with specified name.
copy1 code:
VBA Code:
Sub copy1()
Dim Paste_path As String
Dim s As String
Paste_path = ThisWorkbook.Worksheets("Sheet2").Range("B3").Value
s = Paste_path & "CHECKLIST_" & ThisWorkbook.Worksheets("Sheet1").Range("E5").Value & ".xlsm"
ActiveWorkbook.SaveCopyAs FileName:=s
End Sub
What I'm trying to get is:
1). Copy whole Sheet2 into new workbook as it is.
2). From Sheet1 copy ranges A1:E22 and A26:C27 as values into new workbook.
3). From Sheet1 copy ranges A23:E24 and A28:C28 with functions/formulas.
4). Do that when button is clicked.
Could anyone can assist me with this one?