Martin_H
Board Regular
- Joined
- Aug 26, 2020
- Messages
- 190
- Office Version
- 365
- Platform
- Windows
Hi,
I'm trying to figure out, how to refer to Pivot Table Range without having to directly type "$A$1:$BA$776" because the range varies. I would like to make it indirectly.
Here is part of the code.
Help is much appreciated.
Thank you.
I'm trying to figure out, how to refer to Pivot Table Range without having to directly type "$A$1:$BA$776" because the range varies. I would like to make it indirectly.
Here is part of the code.
VBA Code:
Dim ws As Worksheet
Dim pc As PivotCache, pt As PivotTable
Dim ds As Range
Set ds = ActiveWorkbook.Worksheets("JUNE_DATA").Range("$A$1:$BA$776")
Set pc = ActiveWorkbook.PivotCaches.Create(xlDatabase, ds)
Help is much appreciated.
Thank you.