cht

  1. F

    Problem With Looping through Charts

    Hello I have attached my Code below. I keep getting the Run-Time error '424': Object Required on the code in the loop. Any help is greatly appreciated. Sub p() Dim cht As ChartObject Dim sht As Worksheet Dim CurrentSheet As Worksheet Set CurrentSheet = ActiveSheet For Each cht In...
  2. P

    VBA Chart Formatting to Loop Through all Charts in Workbook

    I have a large dashboard that once complete will have c300 pie charts and need them all to have specific formatting. I have recorded a macro of me applying the formatting to one chart and looked up a macro to loop through all charts in the workbook and tried to combine the two to create the...
  3. T

    Renaming multiple copied pictures in VBA

    Hi, I am copying charts from one excel workbook (model1), and pasting them in a second excel workbook (TempFile) as a picture. There are roughly 60 of these images. I would like to rename these images. The image names keep changing, which leads to problems for the next steps. Does anyone...
  4. G

    code to change chart axes

    Code which I had in another (very similar) Excel project suddenly doesn't work, very simple code. Purpose is to set the min and max value for the X axis of a chart. There is only one chart on the sheet, I tried to loop through all charts in case I had the chart identified incorrectly somehow...
  5. A

    Assigning macro to SCROLL BAR/SPIN BUTTON

    HI, I have X,Y,Z coordinates of points(10 points) on a line. This line changes according to Time.. for each time change line changes and points on it also changes. Suppose it changes 5 times So I will have 5 such XYZ values for those 10 points. I have data for each time pasted in different...
  6. D

    MACRO for pie chart

    Hey guys keep getting an error msg of object variable or with block variable not set..excel highlighted the string of code that may be giving me the issue I a completely stumped need help! the code is below..any help is appreciated Sub Macro5() ' ' Macro5 Macro ' ' Keyboard Shortcut: Ctrl+e '...
  7. B

    Trying to loop through some charts and apply a template - can't get this code to work

    I have a spreadsheet that has a load of charts in and I need to apply a template to them all. This is the code I'm currently using: Sub SetChartFormat() Dim Cht As ChartObject For Each Cht In ActiveSheet.ChartObjects Cht.Chart.ApplyChartTemplate ( _...
  8. E

    change data series for multiple charts

    Hello - I found this VBA that changes the data series for all of the charts in my workbook. Works great. 1. How do I change so that it only changes the charts on a sheet, and not the entire workbook... 2. Possible to also only change selected charts? Thank you. Sub ChangeAllCharts()...
  9. F

    Creating charts in vba throwing error

    Sub TestMod() Dim cht As Object Set cht = Sheets("Jan_2018").ChartObjects.Add(Left:=300, Width:=400, Top:=300, Height:=300) With cht .Chart.Type = xl3DColumnClustered .Chart.SetSourceData Source:=Sheets("Jan_2018").Range("$A$2:$D$2,$A$4:$D$6") End With End Sub I keep...
  10. P

    Run time error in VBA

    This code gives me an error when i open another excel file. It works great for what its supposed to do in the file it is located, but if i open another exel file (Which doesnt have any VBA) it gives me a run time error "The item with the specified name wasnt found". When i give debug it shows me...
  11. K

    How ChartObject works in vba?

    Hi guys, On the internet (on page tutorialspoint.com) 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...

Some videos you may like

This Week's Hot Topics

Top