EXCEL 2007 macro

O

Old Coder

I am having a problem in EXCEL 2007 with macros that have worked since
EXCEL 98. I am trying to copy data from a spreadsheet and copy it to a line
graph. The NEW date for the X axis is in column A and the NEW points for the
line graphs are in several other columns ie E, R, AC. There are many graphs
I update from this one worksheet. I did find a way to Select and paste the
line data using one macro and then select and paste the date using a second
macro.
I have one last problem I am fighting. In order to paste data into a
line graph the line graph must be selected (White circles on the four corners
and four sides) or I get an error. So I must go to each chart and click on
the center of every chart before I run the first macro and then do it again
before running the second macro. Is there any way to select the chart inside
the macro? The macro code that has always worked in other versions no longer
does.
The problem could be that the default line graph settings have changed
because bar and high-low graphs still work fine.
 
J

JE McGimpsey

Old Coder said:
I am having a problem in EXCEL 2007 with macros that have worked since
EXCEL 98. I am trying to copy data from a spreadsheet and copy it to a line
graph. The NEW date for the X axis is in column A and the NEW points for the
line graphs are in several other columns ie E, R, AC. There are many graphs
I update from this one worksheet. I did find a way to Select and paste the
line data using one macro and then select and paste the date using a second
macro.
I have one last problem I am fighting. In order to paste data into a
line graph the line graph must be selected (White circles on the four corners
and four sides) or I get an error. So I must go to each chart and click on
the center of every chart before I run the first macro and then do it again
before running the second macro. Is there any way to select the chart inside
the macro? The macro code that has always worked in other versions no longer
does.
The problem could be that the default line graph settings have changed
because bar and high-low graphs still work fine.

This is a Mac XL newsgroup, so for a XL2007 problem, you'd do better to
post in

microsoft.public.excel.charting

Of course, XL98 is a Mac product, so I'm not sure you don't mean XL04.

In any case, you'd also probably get a better answer if you post
relevant sections of your code, along with explaining what "get an
error" means (i.e., which error(s)).

In general, one can select the charts using

ActiveSheet.ChartObjects("Chart 1").Select

or, if the chart is on its own sheet,

Sheets("Chart1").Select
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top