Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run-time error '1004' unable to get the ChartObjectsproperty of the Chart class

I have a macro that has worked fine for the last 2 years in Excel 97 i
Window NT, until I upgraded to Excel 2002 and Window XP. It gets hun
up on the activate Chart 2 statement (Chart 2 still exists). All th
macro does is set the x axis scale to values I input:

Sub Scale_Charts_Axes()

Sheets("Daily CF Chart").Select
*ActiveSheet.ChartObjects("Chart 2").Activate*
ActiveChart.Axes(xlCategory).Select
With ActiveChart.Axes(xlCategory)
.MinimumScale = Range("cashflow_begin_date").Value - 2
.MaximumScale = Range("end_date").Value + 2
End With
End Sub

I think I have all the same add-ins, but I am not sure. Is there an
add-in or VB reference that could be causing this?
Thanks, ms

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run-time error '1004' unable to get the ChartObjectsproperty of the Chart class

I noticed in someone else's code that a chart was referred to by just
number, so I may have found a work around:

For instance, I changed:
ActiveSheet.ChartObjects("Chart 2").Activate

to

ActiveSheet.ChartObjects(4).Activate

Notice how strangely enough, even though my embedded chart still say
"Chart 2" when I run my cursor over it, the macro knows it now by
(there are a total of 5 charts on my chart sheet).

I rewrote all of my other chart references to this format, and th
macros now work again.

If someone could explain why converting from using Excel 97 to Exce
2002 would cause this sort of problem, I'd appreciate it.

:confused

--
Message posted from http://www.ExcelForum.com

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
Run-Time error '1004' : Select method of Range class failed [email protected] Excel Discussion (Misc queries) 3 March 9th 07 01:36 PM
Error 1004: Unable to set the XValues of the Series Class jonathanmiller Excel Programming 0 June 23rd 04 12:20 AM
Run time error 1004 - Unable to get add property of the buttons class Mark[_37_] Excel Programming 0 March 1st 04 09:48 AM
Run-time error '1004' - Unable to set the Visible property of the Worksheet class Shalin Chopra Excel Programming 3 November 25th 03 08:38 PM
Error 1004 - unable to set the orientation of the page setup class E Sullivan Excel Programming 4 October 27th 03 02:31 PM


All times are GMT +1. The time now is 06:22 PM.

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"