|
ぽんぽんさん、こんにちは
>更に質問ですが、X軸の値を小数点以下1桁の構文
>ActiveChart.Axes(xlValue).TickLabels.NumberFormatLocal = "0.0_ "
>
>は下に示した中のどこにいれればいいですか?
>
>Sub 回帰曲線ACA11_2()
>'
>' 回帰曲線ACA11_2 Macro
>' マクロ記録日 : 2004.3.23 ユーザー名 : mitoh yuko
>'
>
>'
この2行はいらないのでは?
---------------------------------------------
> ActiveWindow.SmallScroll Down:=-27
> Range("E19:E21").Select
---------------------------------------------
> Charts.Add
> ActiveChart.ChartType = xlXYScatter
> ActiveChart.SetSourceData Source:=Sheets("PL00005").Range("E19:E21"), PlotBy _
> :=xlColumns
この形ではグラフシートがつくられませんか?
> ActiveChart.SeriesCollection(1).XValues = "=PL00005!R19C2:R21C2"
> ActiveChart.SeriesCollection(1).Name = "=""ACA11"""
> ActiveChart.Location Where:=xlLocationAsObject, Name:="PL00005"
> With ActiveChart
> .HasTitle = True
> .ChartTitle.Characters.Text = "ACA11"
> .Axes(xlCategory, xlPrimary).HasTitle = True
> .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "ACA11 (ng/mL)"
> .Axes(xlValue, xlPrimary).HasTitle = True
> .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "O.D. (492-630nm)"
> End With
> ●
> ActiveChart.HasLegend = False
> ActiveChart.SeriesCollection(1).Trendlines.Add(Type:=xlPolynomial, Order:=2 _
> , Forward:=0, Backward:=0, DisplayEquation:=True, DisplayRSquared:=True _
> ).Select
>End Sub
で、順番直して実行してみましたが、エラーはでません。
Sub 回帰曲線ACA11_2()
Charts.Add
ActiveChart.ChartType = xlXYScatter
ActiveChart.SetSourceData Source:=Sheets("PL00005").Range("E19:E21"), PlotBy _
:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:="PL00005"
ActiveChart.SeriesCollection(1).XValues = "=PL00005!R19C2:R21C2"
ActiveChart.SeriesCollection(1).Name = """ACA11"""
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "ACA11"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "ACA11 (ng/mL)"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "O.D. (492-630nm)"
End With
ActiveChart.Axes(xlValue).TickLabels.NumberFormatLocal = "0.0_ "
ActiveChart.HasLegend = False
ActiveChart.SeriesCollection(1).Trendlines.Add(Type:=xlPolynomial, Order:=2 _
, Forward:=0, Backward:=0, DisplayEquation:=True, DisplayRSquared:=True _
).Select
End Sub
|
|