- 2008年4月22日 08:21
- Excel VBA | GraphControl
エクセルグラフを既定のテキスチャに設定するマクロです。
Set up Excel chart by texture of ground colors which is fixed in Excel.
| テキスチャの名前 | Name of Texture | PresetTextured | Number |
|---|---|---|---|
| 紙 | Papyrus | msoTexturePapyrus | 1 |
| キャンバス | Canvas | msoTextureCanvas | 2 |
| デニム | Denim | msoTextureDenim | 3 |
| 麻 | WovenMat | msoTextureWovenMat | 4 |
| しずく | WaterDroplets | msoTextureWaterDroplets | 5 |
| 紙袋 | PaperBag | msoTexturePaperBag | 6 |
| 化石 | FishFossil | msoTextureFishFossil | 7 |
| 砂 | Sand | msoTextureSand | 8 |
| 大理石(緑) | GreenMarble | msoTextureGreenMarble | 9 |
| 大理石(白) | WhiteMarble | msoTextureWhiteMarble | 10 |
| 大理石(茶) | BrownMarble | msoTextureBrownMarble | 11 |
| みかげ石 | Granite | msoTextureGranite | 12 |
| 新聞紙 | Newsprint | msoTextureNewsprint | 13 |
| 再生紙 | RecycledPaper | msoTextureRecycledPaper | 14 |
| セーム皮 | Parchment | msoTextureParchment | 15 |
| ひな形 | Stationery | msoTextureStationery | 16 |
| 青い画用紙 | BlueTissuePaper | msoTextureBlueTissuePaper | 17 |
| ピンクの画用紙 | PinkTissuePaper | msoTexturePinkTissuePaper | 18 |
| 紫のメッシュ | PurpleMesh | msoTexturePurpleMesh | 19 |
| ブーケ | Bouquet | msoTextureBouquet | 20 |
| コルク | Cork | msoTextureCork | 21 |
| くるみ | Walnut | msoTextureWalnut | 22 |
| オーク | Oak | msoTextureOak | 23 |
| 木目 | MediumWood | msoTextureMediumWood | 24 |
下記コードは、エクセルグラフの色をエクセル既定のテキスチャ(紙)にします。下の2つの行は同じ意味です。
ActiveChart.PlotArea.Fill.PresetTextured PresetTexture:=1 ''---Papyrus ActiveChart.PlotArea.Fill.PresetTextured PresetTexture:=msoTexturePapyrus
The source code below is to set up chart by using texture of raw ground colors which are fixed in Excel. The codes above are same meaning. msoTexturePapyrus = 1 as Integer.
GraphControl で使用しているコードです。
the source code below is used in GraphControl.
Search