Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Can't change the size of the plot area

Please could anyone tell me what is wromg with this

Function GetPlan(Frm As Form, PlanPath As String) ' Get Chart background

Dim Cht As Chart
Dim ChtArea As ChartArea
Dim Msg As String

On Error GoTo ChangeChartBG_Err

Set Cht = Frm!AllocationPlan.Object
Set ChtArea = Cht.ChartArea

' Ensure Plot area is full size
Cht.Left = 0
Cht.Top = 0

Cht.ChartArea.Clear
Cht.Application.DataSheet.Range("A1").Value = 50 ' Need to feed it some
data to create a plot area
Cht.PlotArea.Width = Cht.Width
Cht.PlotArea.Height = Cht.Height - 100

Debug.Print "Plot Area Height " & Cht.PlotArea.Height & " Chart Height "
& Cht.Height
' This gives Plot Area Height 319 Chart Height 856
***************

With Cht.Axes(xlCategory)
.MinimumScale = 0
.MaximumScale = 100
End With

GetPlans:
If PlanPath "" Then
ChtArea.Fill.UserPicture PictureFile:=PlanPath
ChtArea.Fill.Visible = True
End If

ChangeChartBG_Exit:
Exit Function

ChangeChartBG_Err:
MsgBox Err.Description

End Function


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Increase plot size within Chart area Ropesend Charts and Charting in Excel 3 December 13th 07 02:07 PM
Graph Size not adjusting with Chart Area and Plot Area Jon Peltier Excel Programming 1 September 12th 06 07:01 PM
How to change plot area size of pivot chart juamig Charts and Charting in Excel 3 May 11th 06 12:16 PM
size of the plot area Young-Hwan Choi Excel Programming 0 February 12th 04 03:58 AM
Unable to change plot area size Shinichi Excel Programming 1 September 26th 03 02:50 AM


All times are GMT +1. The time now is 04:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"