arc90 lab | tools: Link Thumbnail
Excel Help Forum
ExcelTip.com
Account Icon Account Icon Account Icon
ExcelTip.com

Go Back   Excel Help Forum > Microsoft Office Application Help - Excel Help forum > Excel Programming > Excel Charting

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-24-2005, 07:24 AM
ramkumar_cpt ramkumar_cpt is offline
Registered User
 
Join Date: 09 Nov 2005
Posts: 29
ramkumar_cpt is an unknown quantity at this point
Unable to set the XValues property of the Series class

Hi


I have one sheet. It contains some charts. I want to put the XValues use macro. But I am unable to run this macro. I got error as Unable to set the XValues property of the Series class.("Run time error 1044"). Anybody can help me?

My macro code is:

ActiveWindow.Visible = False
Windows("FullTemplate.xls").Activate
Range("I22").Select
ActiveSheet.ChartObjects("Chart 1031").Activate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(1).XValues = Worksheets("MonthlyData").Range("B2:B5")
ActiveChart.SeriesCollection(1).Values = "=MonthlyData!R2C5:MonthlyData!R30C5"


Note: I am using Line chart. Pls help me.



Thanks in advance.

Ram.
Reply With Quote
  #2  
Old 11-25-2005, 10:15 AM
Andy Pope
Guest
 
Posts: n/a
Re: Unable to set the XValues property of the Series class

Hi,

Are you sure that was where the code failed.
This line looks the more likely candidate.

ActiveChart.SeriesCollection(1).Values =
"=MonthlyData!R2C5:MonthlyData!R30C5"

try changing the references to,
ActiveChart.SeriesCollection(1).Values = "=MonthlyData!R2C5:R30C5"

Cheers
Andy

ramkumar_cpt wrote:
> Hi
>
>
> I have one sheet. It contains some charts. I want to put the
> XValues use macro. But I am unable to run this macro. I got error as
> Unable to set the XValues property of the Series class.("Run time error
> 1044"). Anybody can help me?
>
> My macro code is:
>
> ActiveWindow.Visible = False
> Windows("FullTemplate.xls").Activate
> Range("I22").Select
> ActiveSheet.ChartObjects("Chart 1031").Activate
> ActiveChart.ChartArea.Select
> *ActiveChart.SeriesCollection(1).XValues =
> Worksheets("MonthlyData").Range("B2:B5")*
> ActiveChart.SeriesCollection(1).Values =
> "=MonthlyData!R2C5:MonthlyData!R30C5"
>
>
> Note: I am using Line chart. Pls help me.
>
>
>
> Thanks in advance.
>
> Ram.
>
>


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
Reply With Quote
  #3  
Old 11-28-2005, 12:15 AM
ramkumar_cpt ramkumar_cpt is offline
Registered User
 
Join Date: 09 Nov 2005
Posts: 29
ramkumar_cpt is an unknown quantity at this point
Unable to set the XValues

Hi,

Andy. yes that is my mistake. Now i have corrected that error. But again i got the same error as Unable to set the XValues property of the Series class.("Run time error 1044"). Pls help me?

This time my coding is:

ActiveSheet.ChartObjects("Chart 1030").Activate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(1).XValues = "=MonthlyData!R2C1:R30C1" ActiveChart.SeriesCollection(1).Values = "=MonthlyData!R2C2:R30C2"
ActiveChart.SeriesCollection(2).XValues = "=MonthlyData!R2C1:R30C1"
ActiveChart.SeriesCollection(3).XValues = "=MonthlyData!R2C1:R30C1"
Reply With Quote
  #4  
Old 11-28-2005, 06:00 AM
Andy Pope
Guest
 
Posts: n/a
Re: Unable to set the XValues property of the Series class

Does your range contain empty cells?

ramkumar_cpt wrote:
> Hi,
>
> Andy. yes that is my mistake. Now i have corrected that error. But
> again i got the same error as Unable to set the XValues property of
> the Series class.("Run time error 1044"). Pls help me?
>
> This time my coding is:
>
> ActiveSheet.ChartObjects("Chart 1030").Activate
> ActiveChart.ChartArea.Select
> *ActiveChart.SeriesCollection(1).XValues =
> "=MonthlyData!R2C1:R30C1"* ActiveChart.SeriesCollection(1).Values =
> "=MonthlyData!R2C2:R30C2"
> ActiveChart.SeriesCollection(2).XValues =
> "=MonthlyData!R2C1:R30C1"
> ActiveChart.SeriesCollection(3).XValues = "=MonthlyData!R2C1:R30C1"
>
>


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
Reply With Quote
  #5  
Old 11-29-2005, 09:42 AM
ramkumar_cpt ramkumar_cpt is offline
Registered User
 
Join Date: 09 Nov 2005
Posts: 29
ramkumar_cpt is an unknown quantity at this point
Yes Andy. My cell has contains no value. it is empty. so what?
Reply With Quote
  #6  
Old 11-29-2005, 10:15 AM
Andy Pope
Guest
 
Posts: n/a
Re: Unable to set the XValues property of the Series class

As a test put some values in the empty cells and try your code. It
should work.

Once you have established the problem is empty cells you can experiment
by populating the first empty cell and seeing if the code still works.

Then you need to update your code to check the status of empty cells and
put something in them temporarily so your code runs. Then clear those
cells when finished.

Cheers
Andy

ramkumar_cpt wrote:
> Yes Andy. My cell has contains no value. it is empty. so what?
>
>


--

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

Bookmarks

New topics in Excel Charting


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


All times are GMT -4. The time now is 06:00 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0