View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
filo666 filo666 is offline
external usenet poster
 
Posts: 265
Default 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