So I'm 90% of the way into creating my first big macro project. Thanks for all your help so far everyone! I've come up against an issue however - which I think should be the last issue I should face before putting the macro into use.
I've written a macro which copies the data presented in a master spreadsheet, creates a new workbook in the target location, then creates a table using the information provided.
What I want to do is use CurrentRegion to allow the data to alter month-to-month. I think the code should go something like this
`GeneratePivotTables Macro
'Converts information stored on sheet "Data" to a table
Dim TABLE As Range
Set TABLE = Sheets("Data").A1.CurrentRegion
Sheets("Data").Listobjects.Add(x1SrcRange, Range("TABLE"), ,1Xyes).Name="Data"
I know this as presented is incorrect, but I'd like some help just parsing this correctly! My aim is to then be able to use the table "Data" to create pivot tables.
Sheets("Data").Listobjects.Add(x1SrcRange, Range("TABLE"), ,1Xyes).Name="Data"is invalid syntax - which i know, but i want to know how to correct it!