Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Charting / December 2003

Tip: Looking for answers? Try searching our database.

Builtin chart type internationalization

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stumped - 19 Dec 2003 03:25 GMT
Hi,
My VB program uses Excel's built in custom type chart
called Smooth Lines. I use the following code to call it:

Excel.ActiveChart.ApplyCustomType ChartType:=xlBuiltIn,
TypeName:="Smooth Lines"

This works fine in an English version Excel but when you
have a German Excel it causes an error and says that the
type name is not applicable. The reason for this is
because the German version of Excel calls the Smooth
Lines as Weiche Linien and if I replace the Smooth Lines
type name with Weiche Linien, it works.

The only solution I could come up with are either:
1. Create my chart with all the properties of Smooth
Lines chart. The chart I created has all the properties
of Smooth Lines except the width is a little off. This is
basically what I have in my VB program:
With .ActiveChart
           .ChartType = xlLine
           .BarShape = xlBox
           .DepthPercent = 100
           .DisplayBlanksAs = xlNotPlotted
           .GapDepth = 150
           .HasDataTable = False
           .HasLegend = True
           .HasPivotFields = False
           .HasTitle = False
           .PlotVisibleOnly = True
           .PlotBy = xlRows
           .ProtectData = False
           .ProtectFormatting = False
           .ProtectGoalSeek = False
           .ProtectSelection = False
           .SizeWithWindow = False
           .Visible = xlSheetVisible
           .WallsAndGridlines2D = False
       End With
       
       With .ActiveChart.Axes(xlValue)
           If .HasMajorGridlines Then
               .MajorGridlines.Border.ColorIndex = 2
           End If
       End With
       .ActiveChart.Axes(xlCategory).CategoryType =
xlCategoryScale
       .ActiveChart.Axes
(xlCategory).AxisBetweenCategories = False

This is not a bad alternative to me but a little
complicated. If I want to use another built in custom
type, I would have to find out all the properties and
compare the physical attributes to my new chart.

2. The second alternative is to open the Smooth Lines
chart and save is as a user defined chart (xlusrgal.xls)
but this will overwrite the user's existing xlusrgal.xls
file and I don't want to do that.

Does anyone have any suggestions on this? Thank you very
much!!
Stephen Bullen - 19 Dec 2003 11:14 GMT
If you are already shipping a workbook as part of your application, you
could include a chart made from the 'Smooth Lines' format inside the
workbook, then copy it and paste special > Formats to the new chart.

Personally though, I'd create the chart based on the closest standard
chart type (i.e. one of the xlChartStyle constants), then change
whichever properties needed changing.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.co.uk
- 22 Dec 2003 07:41 GMT
Thanks! That seems to work really good. The closest to
Smooth Lines is xlLineMarkers and I just changed a couple
of the properties and both charts look identical now.

>-----Original Message-----
>If you are already shipping a workbook as part of your application, you
[quoted text clipped - 12 lines]
>
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.