ich bekomme immer diese fehlermeldung:
the item with the specified name wasn't found
kann jemand damit was anfangen?
folgende stelle wird mir im VBA code angezeigt:
ActiveSheet.Shapes("Chart9").IncrementLeft -175.2
folgendes hab ich gemacht: ich habe ein makro entworfen, welches ein diagramm ausgeben soll und dieses diagramm habe ich nach meinen wuenschen umgestaltet.
anbei der gesamte code:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/2/2002 by jwerner
'
' Keyboard Shortcut: Ctrl+j
'
Dim UserRange As Range
Dim UserSheet As Worksheet
Set UserRange = Selection
Set UserSheet = ActiveSheet
Range("J28:J54,M28:M54").Select
Range("M28").Activate
ActiveWindow.SmallScroll Down:=13
Charts.Add
ActiveChart.ChartType = xlXYScatterLines
ActiveChart.SetSourceData Source:=UserRange, _
PlotBy:=xlColumns
ActiveChart.SeriesCollection(1).Name = "=""272/287/111_107,1.75/1.70,18/18"""
ActiveChart.Location Where:=xlLocationAsObject, Name:=UserSheet.Name
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Chart Title"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = _
"Engine Speed (r/min)"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Cor Torque (ft-lbs)"
End With
With ActiveChart
.HasAxis(xlCategory, xlPrimary) = True
.HasAxis(xlValue, xlPrimary) = True
End With
ActiveChart.Axes(xlCategory, xlPrimary).CategoryType = xlAutomatic
With ActiveChart.Axes(xlCategory)
.HasMajorGridlines = True
.HasMinorGridlines = False
End With
With ActiveChart.Axes(xlValue)
.HasMajorGridlines = True
.HasMinorGridlines = False
End With
ActiveChart.PlotArea.Select
With Selection.Border
.ColorIndex = 16
.Weight = xlThin
.LineStyle = xlContinuous
End With
With Selection.Interior
.ColorIndex = 2
.PatternColorIndex = 1
.Pattern = xlSolid
End With
ActiveChart.ChartArea.Select
ActiveChart.Axes(xlCategory).Select
With ActiveChart.Axes(xlCategory)
.MinimumScale = 6400
.MaximumScale = 7800
.MinorUnitIsAuto = True
.MajorUnit = 200
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MinimumScale = 495
.MaximumScale = 525
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
Windows("super1.xls").SmallScroll Down:=28
Windows("super1.xls").ScrollRow = 38
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart9").IncrementLeft -175.2
ActiveSheet.Shapes("Chart 9").IncrementTop 269.4
Windows("super1.xls").SmallScroll Down:=13
ActiveSheet.Shapes("Chart 9").ScaleHeight 1.59, msoFalse, msoScaleFromTopLeft
ActiveSheet.Shapes("Chart 9").ScaleWidth 1.18, msoFalse, _
msoScaleFromBottomRight
Windows("super1.xls").SmallScroll Down:=6
ActiveSheet.Shapes("Chart 9").ScaleWidth 0.98, msoFalse, msoScaleFromTopLeft
ActiveChart.ChartTitle.Select
Selection.Left = 279
Selection.Top = 1
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.Size = 24
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.PlotArea.Select
Selection.Top = 28
Selection.Width = 590
Selection.Height = 482
ActiveChart.Axes(xlValue).Select
Selection.TickLabels.AutoScaleFont = True
With Selection.TickLabels.Font
.Name = "Arial"
.Size = 20
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.Axes(xlCategory).Select
Selection.TickLabels.AutoScaleFont = True
With Selection.TickLabels.Font
.Name = "Arial"
.Size = 20
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.Axes(xlValue).AxisTitle.Select
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.Size = 20
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.Axes(xlCategory).AxisTitle.Select
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.Size = 20
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.PlotArea.Select
With Selection.Border
.ColorIndex = 57
.Weight = xlMedium
.LineStyle = xlContinuous
End With
Selection.Interior.ColorIndex = xlNone
ActiveChart.Legend.Select
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.Size = 18
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
Selection.Left = 208
Selection.Top = 373
Selection.Width = 354
Selection.Height = 74
With Selection.Border
.ColorIndex = 57
.Weight = xlMedium
.LineStyle = xlContinuous
End With
Selection.Shadow = False
Selection.Interior.ColorIndex = xlAutomatic
ActiveChart.SeriesCollection(1).Select
With Selection.Border
.ColorIndex = 57
.Weight = xlThick
.LineStyle = xlContinuous
End With
With Selection
.MarkerBackgroundColorIndex = xlAutomatic
.MarkerForegroundColorIndex = xlAutomatic
.MarkerStyle = xlAutomatic
.Smooth = False
.MarkerSize = 9
.Shadow = False
End With
End Sub