Hi Guys,
Someone helped me write a code small code below, but I cant get it to work.
When I press F5, the macro name does not show up, and I an unable to proceed on with the code.
Please take a look below and see if you could help me figure it out. Also, If you would like to figure out the purpose of the code pleas click on the original post Here.
Thank you,
Omkar V
Someone helped me write a code small code below, but I cant get it to work.
When I press F5, the macro name does not show up, and I an unable to proceed on with the code.
Please take a look below and see if you could help me figure it out. Also, If you would like to figure out the purpose of the code pleas click on the original post Here.
Code:
Sub CreateDynaPivot(ByVal paramSheet As String, ByVal paramRange As String)
'\\Find Last cell in the datase
Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Select
'\\Generate Pivot table and loop dynamic ranges
Do Until ActiveCell.Address = "$L$1"
Sheets.Add
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:="report1!" & paramRange, Version:=6).CreatePivotTable TableDestination:=paramSheet & "!R3C1", TableName:="PivotTable2", DefaultVersion:=6
Sheets(paramSheet).Select
'.... the rest of your code
End Sub
Thank you,
Omkar V
Last edited by a moderator: