Zkoušel jsem záznamník, ale nevím si rady jak do grafu vložit popisky, nevíte někdo jak na to? Moc by mi to pomohlo, tady jsou kódy obkopírované ze záznamníku:
Sub graf2Napeti()
'
' graf2Napeti Makro
'
'
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Name = "=""Napětí RF"""
ActiveChart.SeriesCollection(1).XValues = _
"='WLD303_01_01_P_0101_0101_140613'!$D$52:$D$186"
ActiveChart.SeriesCollection(1).Values = _
"='WLD303_01_01_P_0101_0101_140613'!$E$52:$E$186"
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(2).Name = "=""Síla uzavření"""
ActiveChart.SeriesCollection(2).XValues = _
"='WLD303_01_01_P_0101_0101_140613'!$D$52:$D$186"
ActiveChart.SeriesCollection(2).Values = _
"='WLD303_01_01_P_0101_0101_140613'!$F$52:$F$186"
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(3).Name = "=""Mřížkový proud"""
ActiveChart.SeriesCollection(3).XValues = _
"='WLD303_01_01_P_0101_0101_140613'!$D$52:$D$186"
ActiveChart.SeriesCollection(3).Values = _
"='WLD303_01_01_P_0101_0101_140613'!$G$52:$G$186"
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(4).Name = "=""Tlak vzduchu"""
ActiveChart.SeriesCollection(4).XValues = _
"='WLD303_01_01_P_0101_0101_140613'!$D$52:$D$186"
ActiveChart.SeriesCollection(4).Values = _
"='WLD303_01_01_P_0101_0101_140613'!$H$52:$H$186"
ActiveWindow.SmallScroll Down:=-36
ActiveChart.ApplyLayout (1)
ActiveChart.ChartTitle.Select
Selection.Delete
ActiveSheet.ChartObjects("Graf 7").Activate
ActiveChart.Axes(xlValue).AxisTitle.Select
ActiveSheet.ChartObjects("Graf 7").Activate
ActiveChart.ChartArea.Select
ActiveSheet.ChartObjects("Graf 7").Activate
ActiveChart.Axes(xlValue).Select
ActiveSheet.ChartObjects("Graf 7").Activate
ActiveChart.Axes(xlValue).MinimumScale = -50
ActiveChart.Axes(xlValue).MinimumScale = 0
ActiveSheet.ChartObjects("Graf 7").Activate
ActiveChart.Axes(xlValue).AxisTitle.Select
ActiveSheet.ChartObjects("Graf 7").Activate
ActiveChart.Axes(xlValue).AxisTitle.Select
ActiveSheet.ChartObjects("Graf 7").Activate
ActiveChart.ChartArea.Select
ActiveSheet.ChartObjects("Graf 7").Activate
ActiveChart.PlotArea.Select
ActiveSheet.ChartObjects("Graf 7").Activate
ActiveChart.Axes(xlValue).MajorGridlines.Select
Selection.Delete
ActiveSheet.ChartObjects("Graf 7").Activate
ActiveSheet.ChartObjects("Graf 7").Activate
ActiveWindow.SmallScroll Down:=-15
End Sub
citovat