Vba - Graphic + Show Detail

Asked

Viewed 60 times

0

Good Afternoon!

Can anyone help with that code.

I am trying to record a macro that when I click on the graph data series, it opens the cases in a new tab (How does show detail)

When saving the code the recorded lines are these:

Sub Macro2()

    ActiveSheet.ChartObjects("Gráfico 6").Activate
    ActiveChart.FullSeriesCollection(1).Select
    ActiveChart.FullSeriesCollection(1).Points(1).Select
    Selection.ShowDetail = True


End Sub

Only when I debug the code or even run straight, is selected the line "Selection.Showdetail = True" and appears the following message: Runtime error '438'

The object does not accept this priority or method

Can anyone help us? Thank you

3 answers

1

Hello,

The "Show Detail (Show Detail) property is unique to dynamic tables. If the graph in question is not a Dynamic Graph (that is, created from a Dynamic Table, through the Dynamic Graph option), this property will not work and therefore error 438 occurs.

Please try to write that same macro from a dynamic graph and make sure it works. If it doesn’t work out, let me know by showing you the steps taken.

At you.,

  • Hi Andrea, thanks for the return. I followed your guidance and it didn’t work! The chart already corresponded to a dynamic table, but I made a base test 1) by selecting the Base cases, selecting the Insert Menu, dynamic graph, choosing dynamic graph, moving the dynamics created to another tab and graph to another tab, recorded the same macro and did not work 2) selecting the Base cases, selecting the Insert Menu, dynamic graph, choosing dynamic graph and dynamic table, moving the dynamics created to another tab and chart to another tab, recorded the same macro and did not give

0

Hello!

I believe that now goes!

Instead of selecting the chart to show the details, try saving the macro by directly selecting the dynamic table, in case, in some row of the Value fields.

I tried it and it worked.

If it still doesn’t work out, let me know.

  • Hi Andrea, it’s gone! What I did to be able to work was to create a transparent button to be on top of the bar line or number when the graph was not columns, then directed to the dynamic table, with this the code Selection.Showdetail = True opens the cases. Thank you very much for all the attention, sorry I haven’t returned before, but I had to record 60 macros.

0

Looking at the documentation and its response, what may have occurred is that the "Enable Detail View" option is disabled.

To check this and possibly enable this option again, do the following:

  • Click on any field of the dynamic table
  • In the guide Analyze in the ribbon, in the Dynamic Table group, click on Options. inserir a descrição da imagem aqui
  • In Options of the Dynamic Table, click on the Dice.
  • Under Dynamic Table Data, check or deselect the checkbox Enable the display of details to disable or enable this option.

Once done, test the macro again. If that’s not the problem or if it still doesn’t work, let me know here.

  • Hi Andréa everything well? In data from the dynamic table the option checkbox Enable Show Details feature was already marked. I unchecked the box and rotated the macro again and it did not work, I checked again and I checked again and also was not.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.