Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Difficulty with RoundCorners property

I'm trying to round the corners of a graph using VBA, but consistently
get a Run-time error '438' Object doesn't support this property or
method. I have no difficulty doing it in Excel and recording a macro,
but seem unable to do it directly from VBA - even cutting and pasting
the macro recorder's code into VBA does me no good. Any assistance
would be greatly appreciated.

In the code listed below, the shadow and legend work like a charm, but
RoundedCorners does not work in either of the two ways shown.


Sincerely

Thomas Philips

Range(Selection, Selection.End(xlDown)).Name = "ChartData1"
Set ch = Sheet3.ChartObjects.Add(Left:=l1, Top:=t1, Width:=w1,
Height:=h1)
With ch.Chart
.ChartType = xlColumnClustered
.SetSourceData Source:=Range("ChartData1")
.ChartArea.Interior.ColorIndex = 2
.PlotArea.Interior.ColorIndex = 2
.ChartArea.Shadow = True

.RoundedCorners = True

.ChartArea.RoundedCorners = True

.Legend.Position = xlTop
End With


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Difficulty with RoundCorners property

RoundedCorners is a property of the chartobject

With ch.Chart
..Parent.RoundedCorners = True

or
ch.RoundedCorners = True

Regards,
Peter T

wrote in message
...
I'm trying to round the corners of a graph using VBA, but consistently
get a Run-time error '438' Object doesn't support this property or
method. I have no difficulty doing it in Excel and recording a macro,
but seem unable to do it directly from VBA - even cutting and pasting
the macro recorder's code into VBA does me no good. Any assistance
would be greatly appreciated.

In the code listed below, the shadow and legend work like a charm, but
RoundedCorners does not work in either of the two ways shown.


Sincerely

Thomas Philips

Range(Selection, Selection.End(xlDown)).Name = "ChartData1"
Set ch = Sheet3.ChartObjects.Add(Left:=l1, Top:=t1, Width:=w1,
Height:=h1)
With ch.Chart
.ChartType = xlColumnClustered
.SetSourceData Source:=Range("ChartData1")
.ChartArea.Interior.ColorIndex = 2
.PlotArea.Interior.ColorIndex = 2
.ChartArea.Shadow = True

.RoundedCorners = True

.ChartArea.RoundedCorners = True

.Legend.Position = xlTop
End With




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
Error Could not set the ControlSource property. Invalid property v Trefor Excel Programming 2 October 28th 07 04:23 PM
Get Property value of class instance by passing string property name [email protected] Excel Programming 2 October 19th 07 05:47 PM
Runtime error 380 - Could not set the list property. Invalid property value. [email protected] Excel Programming 3 February 27th 07 06:35 AM
Runtime Error 380 – Could not set the list property. Invalid property value BernzG[_16_] Excel Programming 2 August 21st 05 10:10 PM
Runtime error 380: Could not set the List property. invalid property value of listbox jasgrand Excel Programming 0 October 6th 04 09:28 PM


All times are GMT +1. The time now is 10:22 PM.

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

About Us

"It's about Microsoft Excel"