Hi all! I'm new to the forums and hope I am placing this post in the correct location. I'm having a lot of trouble automating charts from my VB.NET program. I'm simply graphing one series of data as a time series that must maintain its order as the user filters the data, deletes some data, etc. Because of the changes the user can make, I am using a named variable with the offset command to maintain a dynamic range. I am aware of how to manually build the graph by supplying the series range =workbookname.xls!namedvariable, but I can't figure out how to supply this to my chart from my VB program. The following is some of my VB.NET code.
xlapp.names.add("graph" & i, "=OFFSET(Hidden!$A$20,0," & 1 + i * 3 & ",Hidden!$A$20,1)")
chartrange= ???????
chartPage.ChartWizard(Source:=chartRange, HasLegend:=False, Title:=ParameterNames(i) & " Time Series")
I can supply more code if needed, but figured this would give a general idea of what I am trying to do. This has to work across multiple Office platforms so I am using late binding. All help is greatly appreciated!
xlapp.names.add("graph" & i, "=OFFSET(Hidden!$A$20,0," & 1 + i * 3 & ",Hidden!$A$20,1)")
chartrange= ???????
chartPage.ChartWizard(Source:=chartRange, HasLegend:=False, Title:=ParameterNames(i) & " Time Series")
I can supply more code if needed, but figured this would give a general idea of what I am trying to do. This has to work across multiple Office platforms so I am using late binding. All help is greatly appreciated!