View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Macro and charts

Modify your code to refer to the activesheet.

--
Regards,
Tom Ogilvy


"Chris" wrote:

I'm trying to record a macro that creates a chart from a given set of a data.
When I record the macro in a workbook and attempt to run the macro in another
workbook, I get a reference error. Is there a way to get around this?

When I go to the series tab of the chart, excel is referencing the current
workbook's sheet name for X and Y values. I want excel to reference any new
sheet from any new workbook that I open.