LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default ChartCalculate code causing error when saving workbook

All,

I would appreciate any advice you could shed on this. I
have a workbook which contains a number of pivot tables
based on data in a second, external workbook. I have the
undernoted code in the ChartCalculate event of a
pivotchart in this book to get round the series formats
going back to default when you pivot on the chart. When I
try to save the workbook I get "Run time error 91 - Object
or With block variable not set" message and the debugger
takes me to the For.. line of this code.

It's not a major problem as the purpose of the worksheet
is for users to be able to interrogate a larger data set
without being able to alter it in any way, so they should
have no real need to save it. However, it's still annoying
for me!

The code is as follows:

Private Sub Chart_Calculate()
Dim X As Integer
Application.ScreenUpdating = False
For X = 1 To ActiveChart.SeriesCollection.Count
With ActiveChart.SeriesCollection(X)
.MarkerSize = 7
.Border.Weight = xlMedium
End With
Next X
Application.ScreenUpdating = True
End Sub

Your suggestions are eagerly anticipated.

Pete.
 
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
What's causing error message? Jim Tibbetts Excel Worksheet Functions 4 November 12th 08 06:13 PM
VLOOKUP Formula causing an error japc90 Excel Discussion (Misc queries) 2 July 25th 06 11:36 PM
error message when saving excel workbook Deb Excel Discussion (Misc queries) 1 October 5th 05 08:26 PM
SAVING A COPY OF WORKBOOK W/O THE CODE IN IT gr8guy Excel Programming 2 January 22nd 04 10:18 AM
Saving a Workbook without code KimberlyC Excel Programming 1 August 21st 03 07:07 PM


All times are GMT +1. The time now is 05:29 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"