Charts.add stopped working


G

Guest

Hi all

I programmed an application which adds a chart to a sheet with a simple:

Range("A1:B3").Select
Charts.Add

But now excel gives me a Runtime Error 1004 while creating the chart.

However, if I set up a chart manually and record the macro it does the
exact same thing. if I run the macro afterwards, I still get the 1004!

Any suggestions are welcome

Thanks in advance

Carlo
 
Ad

Advertisements

J

Jon Peltier

Which line fails? If you created a chart sheet and it is still active, the
Range.Select line will fail with an RTE 1004.

- Jon
 
G

Guest

Hi Andy

just found out, that someone protected the workbook instead of the
worksheets, now everything works fine.

Thanks anyways, appreciate the help very much.

Kind regards

Carlo
 
Ad

Advertisements

G

Guest

Hi Andy

Column A contains the Titles
Column B contains Numbers
like

A B
abc 60%
def 30%
ghi 10%

As said, if the chart is created manually everything works fine!

Thanks for the reply

Carlo
 

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