Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default updating charts

Maynard,

You need to set the Rng variable to the range in which you want
to place the Values of the ChtSeries. E.g.,

Set Rng = Worksheets(1).Range("F1:K1")
Rng = ChtSeries.Values


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Maynard" wrote in message
...
I'm attempting to set up a function that will update a chart

based on
allowing the user to select which sheet the data is on. There

are several
series on each chart, so I'm trying to avoid using named

ranges. I can't
seem to figure out why this isn't working. I get "object

variable or with
block variable not set" error on the specified line. Thanks

for any help!
PS - strShtName is entered on a UserForm.

Dim Rng As Range
Dim Cht As Chart
Dim ChtSeries As Series

For Each Cht In ThisWorkbook.Charts
For Each ChtSeries In Cht.SeriesCollection
Rng = ChtSeries.Values 'ERROR ON THIS

LINE!
Rng.Parent.Name = strShtName
Rng = ChtSeries.XValues
Rng.Parent.Name = strShtName
Set Rng = Nothing
Next ChtSeries
Next Cht



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
Charts not updating vitorjose Excel Worksheet Functions 1 July 3rd 08 02:36 PM
Updating Charts Mike Charts and Charting in Excel 1 May 9th 07 01:36 PM
updating pie charts Lilsis7 Excel Discussion (Misc queries) 2 April 24th 06 01:21 PM
Automatic Updating Charts Rich Gibbons Charts and Charting in Excel 2 October 9th 05 11:36 PM
updating charts automatically Chris Charts and Charting in Excel 3 August 16th 05 03:18 PM


All times are GMT +1. The time now is 03:32 AM.

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

About Us

"It's about Microsoft Excel"