Work around for MsChart and bug

Posted Fri, Jan 23 2009 13:06 by bill

Last month (December 2008), Microsoft released some security updates for VB6 components such as the MS Chart control

The first update updates MS Chart to 
The second update  updates MSChart to

Both these versions have a serious bug that will crash the application or cause instability, the chart not to draw or display garbage strings on the screen. 

The problem occurs if you display a DataPointLabel, eg:

Dim dpl As DataPointLabel
Set dpl = MSChart1.Plot.SeriesCollection.Item(1).DataPoints.Item(-1).DataPointLabel

dpl.LocationType = VtChLabelLocationTypeAbovePoint
dpl.ValueFormat = "0.00"


To work around this, add a manifest to your VB6 application, and copy the manifest and an earlier version of MSChart alongside your exe.  The manifest contents needed are:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

   <assemblyIdentity name="Project1"  version=""

                     processorArchitecture="X86" type="win32" />

   <file name="mschrt20.ocx">

      <comClass clsid="{3A2B370C-BA0A-11D1-B137-0000F8753F5D}"



                       description="Microsoft Chart Control 6.0 (OLEDB)" />




Save that with a .manifest extension, e.g. Project1.exe.manifest.  Make sure you replace the name and version attributes in the assemblyIdentity node with your application’s name and version. 

Hopefully there will be a fix to fix the fix soon, but in the meanwhile use side-by-side (SxS) COM and an old version of the mschrt20.ocx to work around this new bug.

Filed under: , , ,


# re: Work around for MsChart and bug

Tuesday, January 27, 2009 1:53 AM by Bob

Have you seen any other reports of issues with the controls in this pair of security fix releases?

I'd love to believe only this particular use of the one particular control has a problem.