Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 179
Default Charts.add stopped working

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
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default Charts.add stopped working

Hi,

What do the cells A1:B3 contain?

Cheers
Andy

Carlo wrote:
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


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default Charts.add stopped working

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
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Carlo" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 179
Default Charts.add stopped working

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

"Andy Pope" wrote:

Hi,

What do the cells A1:B3 contain?

Cheers
Andy

Carlo wrote:
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


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

  #5   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 179
Default Charts.add stopped working

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

"Andy Pope" wrote:

Hi,

What do the cells A1:B3 contain?

Cheers
Andy

Carlo wrote:
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


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtotal has stopped working Tim Mc Excel Worksheet Functions 3 July 21st 05 04:20 PM
filter stopped working Caroline Lackey Excel Discussion (Misc queries) 5 June 8th 05 09:55 PM
VB Stopped Working [email protected] Excel Worksheet Functions 1 April 28th 05 01:56 PM
excel 97 stopped working john f Excel Worksheet Functions 1 April 13th 05 11:52 PM
excel stopped working Steve Excel Discussion (Misc queries) 0 January 13th 05 04:07 AM


All times are GMT +1. The time now is 01:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"