Skip to Content
0
May 19, 2020 at 04:09 PM

VBA to refer to a Crosstab

507 Views

Hi

I'm looking to refer to a crosstable as a ListObject within VBA, however I cannot figure it out how to.

Power Query does recognize BEx crosstables as table, therefore I was thinking I could do the same with VBA.

I'm trying to do the following, however it runs into an error, saying subscript out of range, meaning it cannot be found. Any ideas?

dim tbl as ListObject

set tbl = mysheet.ListObject("SAPCrosstable1")

Thanks!