'erstes Diagramm
Charts.Add
ActiveChart.ChartType = xlLine
'!!!!!!!!!!!!!!!!!!!
ActiveChart.SetSourceData Source:=Sheets("Auswertung D " & D).Range("B20:E30"), PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:="Auswertung D " & D
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Inländische Unternehmen"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Perioden"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Produktivität"
End With
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MinimumScale = Unternehmen(D, 1, 1, 3)
End With
ActiveSheet.Shapes("Diagramm 1").IncrementLeft -229.5
ActiveSheet.Shapes("Diagramm 1").IncrementTop -105#
ActiveWindow.Visible = False
'zweites Diagramm
Charts.Add
ActiveChart.ChartType = xlLine
'!!!!!!!!!!!!!!!!!!!
ActiveChart.SetSourceData Source:=Sheets("Auswertung D " & D).Range("G20:J30"), PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:="Auswertung D " & D
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Ausländische Unternehmen"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Perioden"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Produktivität"
End With
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MinimumScale = Unternehmen(D, 1, n, 10)
End With
ActiveSheet.Shapes("Diagramm 2").IncrementLeft 240#
ActiveSheet.Shapes("Diagramm 2").IncrementTop -104.25ActiveChart.SetSourceData Source:=Sheets("Auswertung D " & D).Range(cells(20,2),cells(20+Perioden,1+n-m)), lotBy:=xlColumns
ActiveChart.SetSourceData Source:=Sheets("Auswertung D " & D).Range(cells(20,3+n-m),cells(20+Perioden,3+n)), lotBy:=xlColumns
dynamische WAN IP per Email verschicken
GucciBass 22.07.2007 - 50 Hits -
ACCESS - Diagrammerstellung mit VBA Code - dynamische x-y-Achsenskalierung
RoWi 02.02.2008 - 111 Hits -
VBA-Editor öffnen und schließen
maxim66 14.03.2008 - 98 Hits - 2 Antworten