Hello!
As the tittle says, I want to open a new file with data from the original file. In the original file we have a pivot table (Daily_report_tbl) with 6 columns and we need to copy the first 3 into the new file. The row number varies from day to day so I can't just copy from row x to row y.
The copied data doesn't need to be turned into a table, I just need the values.
Here is the code I have so far:
I don't really know how to incorporate the copy and paste of the table since I can't find anything online..
Any help is appreciated and thanks in advance!!!
As the tittle says, I want to open a new file with data from the original file. In the original file we have a pivot table (Daily_report_tbl) with 6 columns and we need to copy the first 3 into the new file. The row number varies from day to day so I can't just copy from row x to row y.
The copied data doesn't need to be turned into a table, I just need the values.
Here is the code I have so far:
VBA Code:
Sub createFile ()
Dim reportPath As String
reportPath = ActiveWorkbook.Path & "\" & "2.Emails" & "\"
Dim newWB As Workbook
Set newWB = Workbooks.Add
newWB.SaveAs reportPath & Format(Now, "yyyy-mm-dd") & "_dummyfile.xlsx"
End Sub
I don't really know how to incorporate the copy and paste of the table since I can't find anything online..
Any help is appreciated and thanks in advance!!!