cancel
Showing results for 
Search instead for 
Did you mean: 

Insert new crosstab by VBA

Former Member
0 Kudos

Dear all,

I got a list of queries (technical names) and I should create 1 worksheet with 1 crosstab per query.

This should be done by VBA.

I've looked at the SAPSet* formulars and didn't find anything corresponding.

Any idea?

Kind regards

Michael


Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Michael,

I don't think that this feature is available!

I just recorded a macro, but obviously there is no relation to any technical query Name 🙂

    ActiveWorkbook.Names.Add Name:="SAPCrosstab1", RefersToR1C1:= _

        "=Tabelle1!R4C1"

    Selection.UnMerge

    ActiveWorkbook.Names.Add Name:="SAPCrosstab1", RefersToR1C1:= _

        "=Tabelle1!R4C1:R88C11"

    Selection.UnMerge

Everything that comes with AO is for usage on an inserted query, but not to insert queries.

You probably have to do it manually.

Best regards,

Martin