How to hide a table in excel without resizing the chart

0

I would like to hide a table but it feeds a chart, I would like to do this without resizing the chart. This graphic uses selection buttons that have been formatted with macros.

    
asked by anonymous 10.04.2018 / 13:40

1 answer

0

One option is to use an event on the tab to resize the chart. I opted for the SelectionChange event. Here's the suggestion:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

With ActiveSheet.ChartObjects(1)
         .Height = 325 'ajustar para tamanho desejado
         .Width = 500 'ajustar para tamanho desejado
End With

End Sub

If you need an introduction to events in VBA, follow the suggestion: link

    
13.04.2018 / 16:19