G
Guest
I'm using VBA in MS Excel 97 in calling Excel 2000 to populate a
spreadsheet and draw a chart. I'm having trouble choosing a custom chart
type when I call from Access.
In VBA for Excel 2000, I can use the following to set a custom chart type:
ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, TypeName:="Line - Column"
but when I call this from Access, it generates an xlColumnClustered
chart. (I know this because the debugger tells me that the numerical
value for ActiveChart.ChartType is 51, which is the numerical value for
xlColumnClustered.) I'm guessing that the Access -> Excel code passing
is the problem, because if I run some VBA in Excel itself, I have no
problem with the above code. BTW, the debugger in Excel reports
ActiveChart.ChartType = -4111. I can't plug that into the ChartType when
I set the value, because I get a type mismatch. Obviously the -4111 is
some kind of junk since it's a custom chart type.
Any idea how I can get this custom chart type represented? If not, is
there a way to programatically create a custom chart type on the fly
which will show a line - column chart?
spreadsheet and draw a chart. I'm having trouble choosing a custom chart
type when I call from Access.
In VBA for Excel 2000, I can use the following to set a custom chart type:
ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, TypeName:="Line - Column"
but when I call this from Access, it generates an xlColumnClustered
chart. (I know this because the debugger tells me that the numerical
value for ActiveChart.ChartType is 51, which is the numerical value for
xlColumnClustered.) I'm guessing that the Access -> Excel code passing
is the problem, because if I run some VBA in Excel itself, I have no
problem with the above code. BTW, the debugger in Excel reports
ActiveChart.ChartType = -4111. I can't plug that into the ChartType when
I set the value, because I get a type mismatch. Obviously the -4111 is
some kind of junk since it's a custom chart type.
Any idea how I can get this custom chart type represented? If not, is
there a way to programatically create a custom chart type on the fly
which will show a line - column chart?