Premetto che io e le macro di Excel non andiamo propriamente d'accordo... ci conosciamo da troppo poco tempo...
Che ci può essere che non va???codice:Dim x As Integer x = 2 ' While x <= 261 Num = Sheets("Foglio1").Range("N" & x & "").Value Charts.Add ActiveChart.ChartType = xl3DColumnClustered ActiveChart.SetSourceData Source:=Sheets("Foglio1").Range("A1:L1,A" & x & ":L" & x & ""), PlotBy _ :=xlRows ActiveChart.Location Where:=xlLocationAsNewSheet, Name:="GraphServ" & x & "" ActiveChart.HasLegend = False ActiveChart.HasDataTable = True ActiveChart.DataTable.ShowLegendKey = True ActiveChart.Axes(xlValue).Select Sheets("GraphServ" & x & "").Select With ActiveChart.Axes(xlValue) .MinimumScale = 40 .MaximumScaleIsAuto = True .MinorUnit = 1 .MajorUnit = 5 .Crosses = xlCustom .CrossesAt = Num .ReversePlotOrder = False .ScaleType = xlLinear .DisplayUnit = xlNone End With ActiveChart.PlotArea.Select With ActiveChart .Elevation = 15 .Perspective = 30 .Rotation = 20 .RightAngleAxes = True .HeightPercent = 100 .AutoScaling = True End With ActiveChart.Axes(xlCategory).Select With Selection.Border .ColorIndex = 3 .Weight = xlThick .LineStyle = xlContinuous End With With Selection .MajorTickMark = xlOutside .MinorTickMark = xlNone .TickLabelPosition = xlLow End With ActiveChart.Deselect ActiveChart.PlotArea.Select ActiveChart.Axes(xlValue).Select ActiveChart.DataTable.Select Selection.AutoScaleFont = True With Selection.Font .Name = "Arial" .FontStyle = "Normale" .Size = 8 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic .Background = xlAutomatic End With ActiveChart.DataTable.Select With Selection.Border .ColorIndex = 57 .Weight = xlHairline .LineStyle = xlContinuous End With Selection.ShowLegendKey = False Selection.HasBorderHorizontal = True Selection.HasBorderVertical = True Selection.HasBorderOutline = True ActiveChart.PlotArea.Select Selection.Height = 402 Selection.Left = 1 Selection.Width = 713 Selection.Width = 720 ActiveChart.ChartTitle.Select Selection.AutoScaleFont = True With Selection.Font .Name = "Arial" .FontStyle = "Grassetto" .Size = 20 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic .Background = xlAutomatic End With ActiveChart.Deselect ActiveChart.SeriesCollection(1).Select With Selection.Border .Weight = xlThin .LineStyle = xlAutomatic End With Selection.InvertIfNegative = False With Selection.Interior .ColorIndex = 4 .Pattern = xlSolid End With ActiveChart.Deselect ActiveChart.PlotArea.Select Selection.Width = 602 Selection.Left = 1 Selection.Width = 720 ActiveChart.Deselect x = x + 1 Wend

Rispondi quotando