Dec 11, 2006 Reactivate embedded chart and make it the. Visual Basic for Applications. Just remove the Ch.Activate command. If you want to write event procedures for an embedded chart, you will have to create a class module to do this: Start the Visual Basic editor. Select the desired project in the Project-window. Insert a new class module by selecting the menu Insert| Class Module. Activate the new class module and rename it,. Hi all, I can't make this work for embedded charts in excel. It only works for charts that are on an own sheet. Can someone tell me what to do to make it work for embedded charts as well. Dim Ch As Chart Set Ch = ActiveChart '' Code that reads in input data. Ch.Activate With ActiveChart '' Fill chart with input data.ChartType = xlXYScatterSmoothNoMarkers.SetSourceData Source:=myDataRange, PlotBy:=xlColumns.HasTitle = False.Axes(xlCategory, xlPrimary).HasTitle = True.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = _ 'Displacement [mm]'.Axes(xlValue, xlPrimary).HasTitle = True.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = 'Force ' End With '' more code Thankful for help Jonas. I have a chart embedded on another chart. I can't seem to correctly address the embedded chart so that i can modify it with VBA. I used the macro recorder to see how to refer to this embedded chart. From that i incorporated it. The main chart 'T vs D' is on its own sheet. I never named the embedded chart as 'Chart 4' but thats how it was referred to it when i did the macro recorder? This embedded chart has several series plotted on it, its series 5 that I want to change the X value (its only a single point to plot). I was using the new value (200) as test constant, i will later use variable for this. When running this i get Run Time Error 403 Method 'Activate' of object 'Chart Object' Failed related to the 2nd line below: Sheets('T vs D').Select ActiveSheet.ChartOjects('Chart 4').Activate ActiveChart.SeriesCollection(5).XValues = 200 I wish this would just do what i want instead of what I'm telling it Excel 2007. Hey everyone, I'm really hoping someone can help me with this. I need to plot percentages over time in a line graph in excel. I don't want to have to do a percentage equation in the spreadsheet, I just want excel to take two sets of values and display the percentage in the chart.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2018
Categories |