 |
|
 |
|
Next: Okay, which cunt gave Apple Remote Desktop ROOT a..
|
| Author |
Message |
External

Since: Jun 22, 2008 Posts: 2
|
(Msg. 1) Posted: Sun Jun 22, 2008 1:56 am
Post subject: Chart code developed on PC not working on Mac Archived from groups: microsoft>public>macintosh>general (more info?)
|
|
|
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 >> Stay informed about: Chart code developed on PC not working on Mac |
|
| Back to top |
|
 |  |
External

Since: Jun 22, 2008 Posts: 2
|
(Msg. 2) Posted: Sun Jun 22, 2008 1:11 pm
Post subject: RE: Chart code developed on PC not working on Mac [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Forgot to mention -- the error is "Run-time error '1004':Application-defined
or object-defined error"
--
Robert
"robs3131" wrote:
> 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 >> Stay informed about: Chart code developed on PC not working on Mac |
|
| Back to top |
|
 |  |
External

Since: Jul 20, 2005 Posts: 1758
|
(Msg. 3) Posted: Sat Jul 05, 2008 4:39 pm
Post subject: Re: Chart code developed on PC not working on Mac [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
You also forgot to mention *where* the user is trying to run the code:-)
Without any indication of OS , application & specific versions of each it's
pretty hard to tell what the problem may be.
If it is Excel & it is Mac you'd do best to post directly to that group:
Microsoft.public.mac.office.excel
If it's a PC version of Excel you'll find the WinOffice groups here:
http://www.microsoft.com/office/community/en-us/FlyoutOverview.mspx
Good Luck |:>)
Bob Jones
[MVP] Office:Mac
On 6/22/08 4:11 PM, in article
9C12CEEA-D2BA-43F7-9FB2-2C305956A945.DeleteThis@microsoft.com, "robs3131"
<robs3131.DeleteThis@discussions.microsoft.com> wrote:
> Forgot to mention -- the error is "Run-time error '1004':Application-defined
> or object-defined error" >> Stay informed about: Chart code developed on PC not working on Mac |
|
| Back to top |
|
 |  |
| Related Topics: | code a keystoke - Hi group! Just for fun I'd like to code a keystroke all on my own by using realbasic and carbonlib. I'm on os9. can anyone help me out? I found many keyloggers for macos9 but I ain't interested in them. thanks
Safari zip code - I entered a full zip code in my wife's Safari, but most Web Masters write code that chokes on that, so she has to edit it down to 5 digits. How do we clear out my zip code so it auto-fills only the short one?
Won't boot, error code 11 - January 21, 2004 I turned on several extensions on my older G3 for the usb driver in prep for installing OSX . When I went to restart I got "system error 11. Hold down shift key to restart with extensions off" Ok, so I did that, but still g...
MAC USERS please test my HTML code - www.ziemon.nl/test you'll see a list of 4 files please click on the files ( they wont open, a new html document is opened that checks what file u want to open ), if u see a white page go back with the browser history button, try all 4 of them U should....
Dirty 64-bit code...a good thing? - This may be a really stupid question, but... Ok, remember back around 1990 when some applications were not 32-bit clean? This meant that you could not use them with Mode-32, or with 32-bit addressing turned on when System 7 came out in 1991. My.. |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|