| 
    
     |  | こんにちは グラフの項目軸で表示形式の設定ができるかと思いますが・・・。
 マクロだとどうしてもゆーざ定義の設定ができません。
 yyyy/mm/dd h:mm:ss
 のデータを
 yy/mm/dd h:mm
 
 で表示させたいのです・・・。
 マクロの記録のコードそのままでうごかしても
 オブジェクトはこのプロパティまたはメソッドをサポートしてません。
 となってしまいます。(yyyy/m/d h:mm にすると動きます)
 現状ではEXCEL2000だとできて97だとできないことがわかっています。
 
 そこで、他に設定する方法があればどなたか教えてください。
 (無理かもですね。。。)
 
 
 以下は自分でちょこっと手をいれた実際につかっているコードです。
 
 Sub X軸第2軸設定処理()
 Dim xrng
 Set xrng = Sheets("データシート").Range("B29", Sheets("データシート").Range("IV29").End(xlToLeft))
 ActiveChart.PlotArea.Select
 ActiveChart.SeriesCollection(1).XValues = xrng
 ActiveChart.Axes(xlCategory).Select
 ActiveChart.PlotArea.Select
 With ActiveChart
 .HasAxis(xlCategory, xlPrimary) = True
 .HasAxis(xlCategory, xlSecondary) = True
 .HasAxis(xlValue, xlPrimary) = True
 .HasAxis(xlValue, xlSecondary) = True
 End With
 ActiveChart.Axes(xlCategory, xlPrimary).CategoryType = xlAutomatic
 ActiveChart.Axes(xlCategory, xlSecondary).CategoryType = xlCategoryScale
 ActiveChart.Axes(xlCategory, xlSecondary).Select
 '  Selection.TickLabels.NumberFormatLocal = "yy/m/d h:mm"
 Selection.TickLabels.Orientation = -75
 ActiveChart.SeriesCollection(2).Select
 ActiveChart.Axes(xlCategory, xlSecondary).Select
 Selection.TickLabels.AutoScaleFont = True
 With Selection.TickLabels.Font
 .Name = "MS Pゴシック"
 .FontStyle = "標準"
 .Size = 7
 .Strikethrough = False
 .Superscript = False
 .Subscript = False
 .OutlineFont = False
 .Shadow = False
 .Underline = xlUnderlineStyleNone
 .ColorIndex = xlAutomatic
 .Background = xlAutomatic
 End With
 Selection.TickLabels.Orientation = -79
 ActiveChart.ChartArea.Select
 ActiveChart.Axes(xlCategory, xlSecondary).Select
 ActiveChart.ChartArea.Select
 ActiveChart.PlotArea.Select
 End Sub
 
 
 |  |