Code to reformat pivot chart

M

Mike Collard

I posted this in another forum in error - apologies.

Custom formating is lost in a pivot chart when the pivot
table is refreshed. I can record a macro to reformat each
data series to medium weight but I think it must be
possible to create a For...Each...Next loop instead.

So far have tried:-

For Each SeriesCollection In ActiveChart
Border.Weight = xlMedium
Next

Although I've got the books I can't figure out how to
write the correct code.

Could someone help please?

Thanks

Mike Collard
 
T

Tom Ogilvy

dim sr as Series

For Each sr in ActiveChart.SeriesCollection
sr.Border.Weight = xlMedium
Next

Untested, but that would be my guess.
 
M

Mike Collard

Tom

Spot on!

Many thanks

Mike Collard
-----Original Message-----
dim sr as Series

For Each sr in ActiveChart.SeriesCollection
sr.Border.Weight = xlMedium
Next

Untested, but that would be my guess.

--
Regards,
Tom Ogilvy





.
 

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