Skip to Content
author's profile photo Former Member
Former Member

Insert new crosstab by VBA

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


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 16, 2014 at 12:26 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.