PC Review


Reply
Thread Tools Rate Thread

Difficulty with RoundCorners property

 
 
tkpmep@hotmail.com
Guest
Posts: n/a
 
      10th Apr 2008
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 With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      10th Apr 2008
RoundedCorners is a property of the chartobject

With ch.Chart
..Parent.RoundedCorners = True

or
ch.RoundedCorners = True

Regards,
Peter T

<(E-Mail Removed)> wrote in message
news:1dce0387-376e-4061-bfef-(E-Mail Removed)...
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difficulty with the property .Value of a Range michdenis Microsoft Excel Discussion 13 12th Aug 2008 02:47 AM
when i set the BackgroundImage property in the designer the image still doesnt show in the background of the textbox any other property must be set? Daniel Microsoft C# .NET 1 2nd Nov 2004 02:43 PM
when i set the BackgroundImage property in the designer the image still doesnt show in the background of the textbox any other property must be set? Daniel Microsoft Dot NET 0 2nd Nov 2004 02:03 AM
The controls on this property sheet are disabled because one or more other Network property sheets are already open. To use these controls, close all these property sheets and then reopen this one. =?Utf-8?B?Um9iZXJ0?= Microsoft Windows 2000 Networking 1 11th Apr 2004 12:22 AM
How to throw and catch an exception in the property set when property is bound to a wiform control Keith Roe Microsoft Dot NET Framework 2 4th Dec 2003 05:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:29 AM.