problems changing the size of my chart
Hi, I have this code in a userform (in the Ok button):
Private Sub CommandButton1_Click()
ActiveChart.PageSetup.ChartSize = xlScreenSize
ActiveChart.ChartArea.Height = CLng(TextBox1)
ActiveChart.ChartArea.Width = CLng(TextBox2)
End
End Sub
when I select the chart and run the macro the following error occurs:
Run-time error '1004':
Unable to set the height property of the ChartArea class.
I have no Idea why is this happening; I chacked everithing and it still not
runing
Any suggestion
TIA
|