Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Hello! I have previously posted questions in this field but I have never
gotten an answer. I really really need help with this. I have never programmed before and now I am supposed to do this VBA application for Excel. What I want to do is simple enough but I have trouble implementing it and since and really do not know anything about programming I do not know what is wrong. The problem is that I am supposed to replace the existing series for a chart with new series. I have the new series but when applying them to a new chart it does not work if I have not manually erased the old chart series. This does not seem like an obstacle but this code have to work for other applications. I try to change the series in a loop. Code: Do While k < (UBound(rng)) If Not IsEmpty(rng(k)) Then ActiveChart.SeriesCollection(k).Values = Sheets(varWorksheetInfoArray(0)).Range(rng(k).Offs et(i, 0).Address & ":" & rng(k).Offset(j, 0).Address) Else: End If k = k + 1 Loop The find function returns the correct range so that is not a problem. The problem is that if the chart already has a series the new data does not apply to the chart. I have tried referring to the number instead of the name of the series but with no success. Is there anything that you should do with the chart (this is the first time I am using xl/vba)? Should you try to delete the series or something. Please if you know anything about this help me out. If you see that the code is correct then let me know. I know I have posted questions about this before but I really must get this to work and I have not gotten a proper answer. I have never programmed before and now I am stuck until midnight every day since I have to do this outside of my other things. I know that it just a line or something that is missing but I have no clue where/what or how to figure it out. Please I am begging all you out there if you know anything about this help me out. I have vistited e.g. the Metha Consulting page where there are tips for dynamically chart making but that does not apply here. Please again any help is truly appreciated! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting Excel chart series from vb6 | Charts and Charting in Excel | |||
Chart -- Source Data... -- Series dialog window | Charts and Charting in Excel | |||
Chart will not display complete series | Charts and Charting in Excel | |||
How to change Series order in a Combination Chart? | Charts and Charting in Excel | |||
How to change Series Order in a Combination Chart? | Excel Discussion (Misc queries) |