|
-
Oct 7th, 2005, 11:31 AM
#1
Thread Starter
Junior Member
Change chart type
Hi all,
I have a workbook that includes a pie chart with name “graph1” on a worksheet. I ask from a user to change the chart type to columns. I need a code that checks if the user makes the right changes or not. I tried the following code without success:
VB Code:
Dim xlap As New Excel.Application 'a reference to excel
With xlap.Charts(“graph1”).Add '<---??
If xlap.ActiveChart.ChartType = xlColumnClustered Then
msgbox “right answer”
End If
End With
Please Help!
Thanks in advance
-
Oct 10th, 2005, 03:11 PM
#2
Re: Change chart type
are u doing thin in excel?? or from external app (VB)
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Oct 11th, 2005, 02:32 AM
#3
Thread Starter
Junior Member
Re: Change chart type
I am trying from external VB6 app.
-
Oct 11th, 2005, 03:56 AM
#4
Re: Change chart type
You need to capture the chart instead of adding one..
How many charts are available on the spreadsheet?? This will also depend on whether or not this is a chart on a sheet or a chart sheet...
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Oct 11th, 2005, 04:41 PM
#5
Thread Starter
Junior Member
Re: Change chart type
Ok I found the solution.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|