Курсовая работа: Проект программного модуля для нахождения приближенного значения бесконечной суммы
i = i + 1
Next x
CommandButton1.Enabled = False 'делаем кнопку "Вычислить сумму" недоступной
'Построение диаграммы
Set ry = Sheets(ActiveSheet.Name).Range(Cells(1, 2), Cells(i, 2))
Set rx = Sheets(ActiveSheet.Name).Range(Cells(1, 1), Cells(i, 1))
Charts.Add
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=ry, PlotBy:=xlColumns
ActiveChart.SeriesCollection(1).XValues = "=" & rx.Address(ReferenceStyle:=xlR1C1, external:=True)
ActiveChart.Location Where:=xlLocationAsObject, Name:="Лист1"
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
With ActiveChart.Axes(xlCategory)
.HasMajorGridlines = False
.HasMinorGridlines = False
End With
With ActiveChart.Axes(xlValue)
.HasMajorGridlines = False
.HasMinorGridlines = False
End With
ActiveChart.HasLegend = False
ActiveChart.HasDataTable = False
ActiveChart.Export filename:=CurDir + "\Graf.gif", FilterName:="GIF"
ActiveSheet.ChartObjects.Delete
Worksheets(1).UsedRange.Clear