1. T

    How to Refer to Contiguous ListColumn Ranges by Index

    Hey all, I'm writing a macro to set the source data of a chart to several contiguous table columns but I'm stumped at the syntax. The table column headers can change so I'm trying to refer to their index numbers instead. 1 Dim Table1 as ListObject: Set Table1 = Sheet1.ListObjects(1) 2 Dim...
  2. A

    Delete Chart If It Exists and Select Non-Contiguous Columns

    Hello, I am trying to write a macro that builds a chart when it is run. However, if the chart already exists (ie if the macro has already been run at least once), I would to delete the existing chart and create a new one. To be honest the whole ChartObject vs Chart thing is not very clear to me...
  3. P

    Error exporting to PDF

    I get a "Run-time Error 5 - Invalid procedure call or argument" on the ExportAsFixedFormat to PDF. The preceding save to .jpg works so I am stumped. I know the PDF export interacts with my printer settings so maybe that's an issue. The ChartObject height and width are 1000 so could that be a...
  4. K

    How ChartObject works in vba?

    Hi guys, On the internet (on page I found the following code for creating charts in vba: ' Procedure to Generate Pie Chart Private Sub fn_generate_pie_graph_Click() Dim cht As ChartObject For Each cht In Worksheets(1).ChartObjects cht.Chart.Type = xlPie Next...
  5. B

    For Each Chart Help Needed

    Hi All, Trying to loop through 72 charts on a single worksheet to update the border color on them. My VBA code fails with a "Type mismatch" on the beginning of the With. Little help please? Code below. Sub PivotBorder() Dim MyChart As ChartObject For Each MyChart In...
  6. C

    Copying a chart from Excel into a Word Template

    Hi there, I have created a chart in Excel and want this to appear at the Bookmark 'CIPChart' in a premade Word template. This is my code. The Word template opens fine but I can't get the chart to copy and paste into it. Where am I going wrong? Sub macro() Dim word As Object, templateFile...
  7. Enter1

    Get underlying range address of a chartobject in Excel

    Hello All, Im currently working on a project where I have excel files that have atleast 60-100 graphs each for different parameters. I wanted to list the underlying cell location of these charts in a separate excel sheet. I know I can do the opposite using VBA (specify where a chart can be...
  8. H

    Object doesn't support this property or method --- ChartObject and seriesCollection

    Hello, I have multiple charts embedded on a worksheet and I want to color every series point so they all look the same. This is my sub: Sub uniformChart() Dim mapChart As ChartObject Dim objSeries As Series For Each mapChart In ActiveWorkbook.Sheets("Home").ChartObjects With mapChart...
  9. L


    I'm currently using the following code but it is only when create the first chart. I need it to be dynamic. <o:p></o:p> ActiveSheet.ChartObjects("Chart 1").Activate <o:p></o:p> <o:p> </o:p> I also have tried the following but they don't work either.<o:p></o:p> <o:p> </o:p>...
  10. K

    Setting charts on multiple sheets invisible vba

    I have about 9 different sheets, but they all will have 4 types of graphs (totals, comparison, bydate, trend). I am writing vba to conditionally show one type of graph on every sheet. For example, if I want to show the totals graphs, I want all of my sheets in the workbook to update. I can...
  11. D

    Chartobjects count method

    Hi, I've a worksheet with several rows of two charts. I try to delete and add new ones, but therefore I need their names. So what I do is, each time I rename all these charts in the following way: For i = 1 To ActiveSheet.ChartObjects.Count ActiveSheet.ChartObjects(i).Name = i Next i Problem...
  12. M

    How could I select a chart within a sheet?

    I've created some examples trying to discover: Dim mychart As ChartObject Set mychart = ActiveWorkbook.ActiveSheet.ChartObject(1) Debug.Print mychart.NameSub EditSeriesName() Charts(1).Select ActiveChart.SeriesCollection(4).Name = "Nova" End Subbut I can't select a chart...
  13. mrhammerstein

    VBA Chart Macro Error (Specific Dimensions not valid for current chart type)

    I have created a macro to make some charts on the activesheet. I'm using 2007 SP2 excel on a Vista 64 bit computer. It works perfect for me. However, the person ultimately who's going to run it can't get the macro to run. That computer is XP with 2007 SP2 as well. This error is returned. The...
  14. D

    Changing chartobject name VBA

    Is there anyway that I can rename a chart object through VBA so it is easier to refer to them instead of "Chart1" and so on. Im guessing it is something you do when creating the chart. ActiveSheet.ChartObjects("Chart 1")

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back