動作検証バージョン:64bit Windows 10 Pro + 32bit Excel(バージョン2106 ビルド14131.20278 Microsoft Store)

ワークシート上の埋め込みグラフの入れ物を表すChartObjectオブジェクトは、図形を表すShapeオブジェクトに似た部分があります。
ChartObjectオブジェクトに用意されているプロパティは、Shapeオブジェクトのプロパティより少ないのですが、同じものが結構あります。
[スポンサードリンク]
ChartObjectオブジェクトのプロパティとShapeオブジェクトのプロパティを比較したかったので、一覧を作成しました。
| Excel.ChartObjectのプロパティ | 戻り値 | Excel.Shapeのプロパティ | 戻り値 |
|---|---|---|---|
| - | Adjustments | Adjustments | |
| - | AlternativeText | String | |
| Application | Application | Application | Application |
| - | AutoShapeType | MsoAutoShapeType | |
| - | BackgroundStyle | MsoBackgroundStyleIndex | |
| - | BlackWhiteMode | MsoBlackWhiteMode | |
| BottomRightCell | Range | BottomRightCell | Range |
| - | Callout | CalloutFormat | |
| Chart | Chart | Chart | Chart |
| - | Child | MsoTriState | |
| - | ConnectionSiteCount | Long | |
| - | Connector | MsoTriState | |
| - | ConnectorFormat | ConnectorFormat | |
| - | ControlFormat | ControlFormat | |
| Creator | XlCreator | Creator | XlCreator |
| - | Decorative | MsoTriState | |
| - | Fill | FillFormat | |
| - | FormControlType | XlFormControl | |
| - | Glow | GlowFormat | |
| - | GraphicStyle | MsoGraphicStyleIndex | |
| - | GroupItems | GroupShapes | |
| - | HasChart | MsoTriState | |
| - | HasSmartArt | MsoTriState | |
| Height | Double | Height | Single |
| - | HorizontalFlip | MsoTriState | |
| - | Hyperlink | Hyperlink | |
| - | ID | Long | |
| Index | Long | ー | |
| Left | Double | Left | Single |
| - | Line | LineFormat | |
| - | LinkFormat | LinkFormat | |
| - | LockAspectRatio | MsoTriState | |
| Locked | Boolean | Locked | Boolean |
| - | Model3D | Model3DFormat | |
| Name | String | Name | String |
| - | Nodes | ShapeNodes | |
| - | OLEFormat | OLEFormat | |
| - | OnAction | String | |
| Parent | Object | Parent | Object |
| - | ParentGroup | Shape | |
| - | PictureFormat | PictureFormat | |
| Placement | Variant | Placement | XlPlacement |
| PrintObject | PrintObject | ー | |
| ProtectChartObject | Boolean | ー | |
| - | Reflection | ReflectionFormat | |
| - | Rotation | Single | |
| RoundedCorners | Boolean | ー | |
| Shadow | Boolean | Shadow | ShadowFormat |
| ShapeRange | ShapeRange | ー | |
| - | ShapeStyle | MsoShapeStyleIndex | |
| - | SmartArt | SmartArt | |
| - | SoftEdge | SoftEdgeFormat | |
| - | TextEffect | TextEffectFormat | |
| - | TextFrame | TextFrame | |
| - | TextFrame2 | TextFrame2 | |
| - | ThreeD | ThreeDFormat | |
| - | Title | String | |
| Top | Double | Top | Single |
| TopLeftCell | Range | TopLeftCell | Range |
| - | Type | MsoShapeType | |
| - | VerticalFlip | MsoTriState | |
| - | Vertices | Variant | |
| Visible | Boolean | Visible | MsoTriState |
| Width | Double | Width | Single |
| ZOrder | Long | - | |
| - | ZOrderPosition | Long |
位置や大きさに関わるプロパティの戻り値が、ShapeオブジェクトではSingleで定義されているのに対し、ChartObjectオブジェクトの場合Doubleになっていること等を興味深く感じます。
最終更新日時:2021-11-26 15:18
[スポンサードリンク]
Home » エクセルマクロ・Excel VBAの使い方 » グラフ・Chart » ChartObjectとShapeのプロパティ比較一覧
『インストラクターのネタ帳』では、2003年10月からMicrosoft Officeの使い方などを紹介し続けています。










