Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem resizing a chart in excel

Status
Not open for further replies.

thetambarineman

Technical User
Feb 29, 2000
63
GB
Hi there,

I'm having a few problems with the activechart object in Excel. I'm extracting a set of data from a database and
importing it into Excel. - I can get the chart object itself working - but when I increase the dimensions of the data (i.e. 15 rows and 15 columns) - the chart doesn't resize itself accordingly. Some of the data is hidden. Can anyone suggest a way I could possibly get this object resized? I've looked at the activechart object but can't see anything?

Thanks for your help...

Paul.

I've attached my code:

'select all of the data that's been exported...
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select

With xl ' add the chart and format it...
.Charts.Add
.ActiveChart.ChartType = xl3DBarClustered
.ActiveChart.HasTitle = True
'give the title from the matrix - i.e. Sum of Net Amount _
(Hor:Name by Ver:Expense) : On 5 Jul 2004
.ActiveChart.ChartTitle.Characters.Text = mvarTITLE
.ActiveChart.Axes(xlCategory).HasTitle = True
'pass in the horizontal fieldname from matrix on asp page...
.ActiveChart.Axes(xlCategory).AxisTitle.Characters.Text = mvarHORIZ
.ActiveChart.Axes(xlValue).HasTitle = True
'pass in the vertical fieldname from matrix on asp page...
.ActiveChart.Axes(xlValue).AxisTitle.Characters.Text = mvarVERT
'.ActiveChart.Location xlLocationAsNewSheet, mvarTITLE
.UserControl = True
End With
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top