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.
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.
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