View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Error 1004 - Unable to set invertifnegative

Glad you got it cleared up. Sometimes all it takes is another set of eyes,
or a different line of logic.

"takedownsf" wrote:

OMG! Thank you so much Andy! You're question made me realize I wasn't running
the chart in the correct settings in Advent. It's working now! And thank you
JLGWhiz for being patient with me and helping me get rid of the
"invertifnegative" problem. You two rock!

"Andy Pope" wrote:

Hi,

Silly question but is the active chart you are trying to run the code on
a column or bar chart?

Cheers
Andy

takedownsf wrote:
Hello,

I am trying to record a macro that I can use with Advent Axys to change the
chart attributes in that program. When I try running the marco, I get a "run
time error 1004 - unable to set the invertifnegative property of the series
class" error message.

Someone on this forum suggested I try putting a (') in front of the code
that was giving me problems but after I did that, I got this error message,
"unable to set the color index property of the interior class."

Can someone please look at my code and tell me what's wrong? Thanks!

Sub imark()
'
' imark Macro
' Macro recorded 5/21/2008 by sandy
'

'
ActiveChart.SeriesCollection(1).Points(1).Select
ActiveChart.PlotArea.Select
ActiveChart.SeriesCollection(1).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
Selection.Shadow = False
'Selection.InvertIfNegative = False
With Selection.Interior
.ColorIndex = 32
.Pattern = xlSolid
End With
ActiveChart.SeriesCollection(1).ApplyDataLabels AutoText:=True,
LegendKey:= _
False, ShowSeriesName:=False, ShowCategoryName:=False,
ShowValue:=True, _
ShowPercentage:=False, ShowBubbleSize:=False
ActiveChart.SeriesCollection(1).DataLabels.Select
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
.Background = xlTransparent
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.ReadingOrder = xlContext
.Position = xlLabelPositionCenter
.Orientation = xlUpward
End With
Selection.NumberFormat = "$#,##0.00"
ActiveChart.Axes(xlValue).Select
Selection.TickLabels.NumberFormat = "#,##0"
ActiveChart.ChartTitle.Select
Selection.Characters.Text = "ACCOUNT MARKET VALUES"
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
Selection.Font.Bold = True
ActiveChart.PlotArea.Select
ActiveChart.ChartArea.Select
End Sub


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info