Activate Chart

B

Bill

Hello,

Background:
I created a spreadsheet that is linked to an MS Access table. The
spreadsheet contains a pivot report and pivot chart. A custom chart
was created and saved.

Objective:
When the users open the spreadsheet, I always want the chart to open
with the custom format. I also always want the custom chart format
whenever they change the values in the PivotChart field buttons.

Approach:
I recorded a macro and used the code to insert the following:

Private Sub Chart_Activate()
ActiveChart.ApplyCustomType ChartType:=xlUserDefined,
TypeName:="MyChart1"
End Sub

Private Sub Chart_Calculate()
ActiveChart.ApplyCustomType ChartType:=xlUserDefined,
TypeName:="MyChart1"
End Sub

Problem:
When I work with the chart in the area where I am developing it, all
works well. When copied over to a different share on the network, I'm
getting a Run Time Error 1004.

I am wondering if there is a permissions problem, or if there is a
problem with the custom chart i created and saved.

I'm a newbie at this. Any thoughts or suggestions would be
appreciated.
thanks,
Bill
(e-mail address removed)
 
T

Tom Ogilvy

Xl8galry.xls stores custom chart formats that come with Microsoft Excel 97.
Xlusrgal.xls stores any custom chart formats that you create. Microsoft
Excel does not create Xlusrgal.xls until you create a custom chart format.

When someone else opens your xls file, their excel looks at their
xlusrgal.xls, not yours.

maybe it would be easier to put in code to do the formatting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top