This one might take someone with Excel macro and chart parameter 
savvy.

I successfully (in Access Basic) exported a query to Excel, opened 
the spreadsheet application, turned on autofilter, highlighted the 
1st 4 columns, chose a chart type (Line - Column on 2 Axes) and 
created a chart by 1st manually turning on a macro, doing what I 
wanted, turning off the macro then copying the code into an access 
module. Worked great. THEN in the same piece of code, I repeated the 
process with a similar query, same spreadsheet, same chart, i.e a 
2nd chart in the same spreadsheet. The 1st chart was perfect, i.e 3 
items in the legend on the side based on the 2nd, 3rd and 4th 
highlighted columns. For some reason the second chart had 4 items in 
the legend, 1 for each of the columns highlighted.

Even weirder, if I ran my process a 2nd time, creating a 2nd 
spreadsheet in the same session, the 2nd chart was correct!
To reiterate, if I close down access, restart access and try again,
the 1st sheet has the problem with the 2nd chart and if I run the 
process again (from a form) the 2nd spreadsheet is fine, i.e. both 
charts are correct.

Conclusion: Something gets initialized after the first spreadsheet 
has been created, but I have no idea what it is.

More information: If I create a 3rd chart in the same spreadsheet 
(same process), both the 2nd and 3rd charts have the additional item 
in the legend. The second run corrects both the charts.

Thanks for your patience. 

Any ideas on how to force Excel VBA to be consistent in it's using 
only 3 of the columns to graph? There must be an intermittent 
default. Perhaps if I had a full list of the chart variables 
settable by code I could ferret it out. Any ideas?

Jnana Sivananda




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessVBACentral/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to