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:
  1. Dim xlap As New Excel.Application 'a reference to excel
  2. With xlap.Charts(“graph1”).Add '<---??
  3. If xlap.ActiveChart.ChartType = xlColumnClustered Then
  4. msgbox “right answer”
  5. End If
  6. End With

Please Help!
Thanks in advance