Option Explicit
Sub prima_parte()
Dim wb As Workbook
Dim ws As Worksheet, wsC As Chart
Dim X As Long, y As Long, i As Long
Dim rngC As Range, cella As Range
Set wb = ThisWorkbook
Set ws = wb.Worksheets(1)
For Each wsC In wb.Charts
Application.DisplayAlerts = 0
If wsC.Name = "Il mio Grafico" Then wsC.Delete
Application.DisplayAlerts = 1
Next wsC
With ws
X = .Range("A" & .Rows.Count).End(xlUp).Row
Set rngC = .Range("A6:B" & X)
End With
Set wsC = wb.Charts.Add
With wsC
.ChartType = xlRadar
.SetSourceData Source:=rngC
.Name = "Il mio Grafico"
.Legend.Delete
.HasAxis(xlValue) = True
With .Axes(xlValue)
.TickLabelPosition = xlNone
.MinimumScale = 0
.MaximumScale = 250
End With
End With
ws.Select
Set wb = Nothing
Set ws = Nothing
Set wsC = Nothing
End Sub
|