Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Macintosh > Chart code deve...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 1435 of 1481
Post > Topic >>

Chart code developed on PC not working on Mac

by =?Utf-8?B?cm9iczMxMzE=?= <robs3131@[EMAIL PROTECTED] > Jun 22, 2008 at 01:56 AM

Hi all,

The line of code preceeded by '***' below is coming up as an error when a 
user of mine tries to execute code that was develpoed (and works) on a PC.
 
Any idea why this line would fail?

            'Add the chart in
        Sheets("Survey Data Output").Activate
        With ActiveSheet.ChartObjects.Add _
                (Left:=1, Width:=450, Top:=vartop, Height:=250)
            .Chart.SetSourceData Source:=Range(rngchart.Offset(1, 0), 
rngchartend)
            .Chart.ChartType = xlColumnStacked
            .Chart.HasTitle = False
            .Chart.Axes(xlCategory, xlPrimary).HasTitle = False
            .Chart.Axes(xlValue, xlPrimary).HasTitle = True
            .Chart.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = _
                "Number of Occurrences"
            .Chart.HasLegend = False
            .Chart.HasDataTable = False
            
            With .Chart.SeriesCollection(2).Interior
                .ColorIndex = 36
                .Pattern = xlSolid
            End With
            With .Chart.ChartArea.Interior
                .ColorIndex = 19
                .PatternColorIndex = 1
                .Pattern = 1
            End With
            
            With .Chart.PlotArea.Border
                .ColorIndex = 16
                .Weight = xlThin
                .LineStyle = xlContinuous
            End With
            With .Chart.PlotArea.Interior
                .ColorIndex = 36
                .PatternColorIndex = 1
                .Pattern = xlSolid
            End With
            
            With .Chart.SeriesCollection(2).Border
                .Weight = xlThin
                .LineStyle = xlNone
            End With
            .Chart.SeriesCollection(2).Shadow = False
            .Chart.SeriesCollection(2).InvertIfNegative = False
            With .Chart.SeriesCollection(2).Interior
                .ColorIndex = 36
                .Pattern = xlSolid
            End With
***            .Chart.SeriesCollection(2).ApplyDataLabels AutoText:=True, 
LegendKey:= _
                False, ShowSeriesName:=False, ShowCategoryName:=False, 
ShowValue:=True, _
                ShowPercentage:=False, ShowBubbleSize:=False
            With .Chart.SeriesCollection(2).DataLabels
                .HorizontalAlignment = xlCenter
                .VerticalAlignment = xlCenter
                .ReadingOrder = xlContext
                .Position = xlLabelPositionInsideBase
                .Orientation = xlHorizontal
            End With
            
        End With


-- 
Robert
 




 3 Posts in Topic:
Chart code developed on PC not working on Mac
=?Utf-8?B?cm9iczMxMzE=?=   2008-06-22 01:56:00 
RE: Chart code developed on PC not working on Mac
=?Utf-8?B?cm9iczMxMzE=?=   2008-06-22 13:11:02 
Re: Chart code developed on PC not working on Mac
CyberTaz <onlygeneralt  2008-07-05 16:39:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 9:30:08 CST 2008.