Solved

Pivot Chart - crtx within display file?

Posted on 2013-11-11
5
375 Views
Last Modified: 2013-11-12
Hello,

Currently, this is what is happening. There is a network folder which has two files - a xlsm file that has several pivots and pivot charts in it. There is also a crtx template file in the same location,which
stores the chart template style. Now when users refresh the charts in the xlsm files, it gets a weird format  and extra text in the chart.

Thats why when they press a button - then the charts in the existing xlsm file, get a stored template applied to them, to maintain the chart look as desired.

Problem  - right now the code you see is below:

set wks = activesheet
templateLoc = "network\kkk\myChartTemplate.crtx"

 wks.ChartObjects("myDisplayChart").Activate
        ActiveChart.ApplyChartTemplate (templateLoc)

Open in new window



is there is any way that I could put the template or embed the template directly inside the xlsm file itself  (that has all the pivots and charts?)

-Instead of storing the crtx file separately  and then applying template from it into the xlsm file?

thank you
0
Comment
Question by:Rayne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 30

Expert Comment

by:gowflow
ID: 39640916
could you post the whole code that is reading template and applying to see the whole process
gowflow
0
 

Author Comment

by:Rayne
ID: 39641332
Hello Gowflow,

this is my whole code. the lines above are repeated 4 times to apply templates to four pivot charts - makes sense ?
0
 
LVL 30

Accepted Solution

by:
gowflow earned 500 total points
ID: 39641621
ok then can you post this file at least so I see what is going on and also post the sheet that have the pivot and the graph to see how it is interacting.
"network\kkk\myChartTemplate.crtx"

I need it so I can simulate as honestly all the questions you have asked so far I did not know the answer offhand but worked on the sample to get my way around.
gowflow
0
 

Author Comment

by:Rayne
ID: 39641894
Thank you Gowflow,

got it. I have uploaded the test file. It would not let me upload a crtx template file. you can easily create one I guess, from the existing one there.

Rayne
samplechartFile.xlsm
0
 
LVL 30

Expert Comment

by:gowflow
ID: 39643815
I don't understand. You accepted my comment as a solution and you posted the file afterward. Did you find the solution or still need help which I presume you do.

In case you still need help you need to tell me how create the crtx template from the file you posted as total newbie in this area.

gowflow
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question