SE の雑記

SQL Server の情報をメインに Microsoft 製品の勉強内容を日々投稿

シグマクロを作ってみよう

leave a comment

突然ですがシグマクロを作ってみたいと思います。

一部でコラ画像としてシグマクンが大人気の今日この頃です。
# シグマクンについては → 第1回 プログラミングはこんなに楽しい!


image

ちなみにシグマクン、ビール大好きらしいです。
シグマクンのビール情報をゲットするために、兎に角麦酒 (兎に角ビール、とにかくビール) も購読いただければと。
あと、シグマクンつながりで夜王様という人形町の夜の帝王もいますので、こちらは「夜王様」という単語を覚えておいていただければと。
# 夜王様の伝説にスポットライトを当てた兎に角夜王というサイトできないですかね。
縄神様だったりえろす師匠だったりインターネットの世界は広大です。

ちなみに当時のシグマクン、後輩を募集していたそうです。
steph.gif なので、シグマクンはステファニー(仮)という後輩がほしかったようです。

image

シグマクンを書くためのシグマクロを Excel で作ってみたいと思います。Excel にはマクロの記録があり、これで図形描画も記録できるのでせっせと書きます。
image

 

以下のコードを実行すると突如シグマクンが現れます。

image

 

Sub SigMacro1()
'
    ' 輪郭
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 414, 461.25)
        .AddNodes msoSegmentCurve, msoEditingAuto, 425.8750393701, 455.3749606299, _
        436.1250393701, 442.3749606299, 446.25, 435.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 456.3749606299, 429.1250393701, _
        466.6250393701, 427.3749606299, 474.75, 421.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 482.8749606299, 415.6250393701, _
        490.5, 409.25, 495, 400.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 499.5, 391.75, 500.5, 383.25, _
        501.75, 369
        .AddNodes msoSegmentCurve, msoEditingAuto, 503, 354.75, 504.5, 329.75, 502.5, _
        315
        .AddNodes msoSegmentCurve, msoEditingAuto, 500.5, 300.25, 491.1249606299, _
        288.3749606299, 489.75, 280.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 492.5, 275.5, 495.8750393701, _
        270.75, 498, 265.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 500.1250393701, 260.25, _
        501.8750393701, 256.3749606299, 502.5, 249
        .AddNodes msoSegmentCurve, msoEditingAuto, 503.1250393701, 241.6249606299, _
        504.5, 229, 501.75, 221.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 499, 213.5, 494.75, 207.5, 486, _
        202.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 477.25, 197.5, 460.8749606299, _
        191.75, 449.25, 191.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 437.6250393701, 190.75, _
        426.1249606299, 192.3750393701, 416.25, 199.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 406.3750393701, 206.6249606299, _
        398.187480315, 220.3124409449, 390, 234
        .AddNodes msoSegmentCurve, msoEditingAuto, 386, 232.75, 383, 231.1249606299, _
        378, 230.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 373, 229.3749606299, 369.75, _
        228.3750393701, 360, 228.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 350.25, 229.1249606299, _
        328.8750393701, 230.1249606299, 319.5, 232.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 310.1249606299, 234.8750393701, _
        306.937480315, 238.937480315, 303.75, 243
        .AddNodes msoSegmentCurve, msoEditingAuto, 301.5, 238.75, 300.75, _
        235.6249606299, 297, 230.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 293.25, 224.8750393701, _
        288.6249606299, 215.8749606299, 281.25, 210.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 273.8750393701, 205.6250393701, _
        263.8749606299, 201.1249606299, 252.75, 199.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 241.6250393701, 197.8750393701, _
        225.1249606299, 196.8749606299, 214.5, 201
        .AddNodes msoSegmentCurve, msoEditingAuto, 203.8749606299, 205.1249606299, _
        193.6249606299, 214.25, 189, 224.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 184.3749606299, 234.25, 184.25, _
        250.25, 186.75, 261
        .AddNodes msoSegmentLine, msoEditingAuto, 204, 288.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 200, 291, 196, 290.3749606299, 192 _
        , 295.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 188, 300.6249606299, 180.8749606299 _
        , 304.3750393701, 180, 319.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 179.1250393701, 334.6249606299, _
        180.3749606299, 366.3749606299, 186.75, 386.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 193.1249606299, 406.1249606299, _
        202.1250393701, 425.3750393701, 218.25, 438.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 234.3749606299, 452.1249606299, _
        257.3750393701, 461.1250393701, 283.5, 466.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 309.6249606299, 471.8749606299, _
        353.1250393701, 471.8749606299, 375, 471
        .AddNodes msoSegmentCurve, msoEditingAuto, 396.8749606299, 470.1250393701, _
        402.1249606299, 467.1250393701, 414, 461.25
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        .ForeColor.RGB = RGB(186, 0, 255)
        .Transparency = 0
        .Solid
    End With
    
    ' 鼻
    ActiveSheet.Shapes.AddShape(msoShapeOval, 322.5, 353.25, 45, 31.5).Select
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
        .Solid
    End With
    
    ' 口
        With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 271.5, 393)
        .AddNodes msoSegmentCurve, msoEditingAuto, 275.812519685, 402, 280.1250393701 _
        , 411, 288.75, 414.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 297.3749606299, 418.5, _
        315.3750393701, 417.1249606299, 323.25, 415.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 331.1249606299, 413.8750393701, _
        331.3750393701, 405.1249606299, 336, 405
        .AddNodes msoSegmentCurve, msoEditingAuto, 340.6249606299, 404.8750393701, _
        343.25, 412.3749606299, 351, 414.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 358.75, 417.1250393701, _
        374.8749606299, 418.8749606299, 382.5, 419.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 390.1250393701, 419.6250393701, _
        392.1250393701, 419.6249606299, 396.75, 417
        .AddNodes msoSegmentCurve, msoEditingAuto, 401.3749606299, 414.3750393701, _
        405.8124409449, 408.937480315, 410.25, 403.5
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    
    ' 左目
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 390.75, 267.75)
        .AddNodes msoSegmentCurve, msoEditingAuto, 381.25, 270.1250393701, _
        380.6249606299, 274, 378, 280.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 375.3750393701, 287, 373.5, _
        296.8750393701, 375, 306.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 376.5, 316.6249606299, 378.5, _
        332.8750393701, 387, 339.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 395.5, 346.6249606299, 415.75, _
        348.3750393701, 426, 348
        .AddNodes msoSegmentCurve, msoEditingAuto, 436.25, 347.6250393701, 443.5, _
        343.5, 448.5, 337.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 453.5, 331.5, 455.3750393701, _
        320.75, 456, 312
        .AddNodes msoSegmentCurve, msoEditingAuto, 456.6249606299, 303.25, 455.75, _
        292.6250393701, 452.25, 285
        .AddNodes msoSegmentCurve, msoEditingAuto, 448.75, 277.3749606299, 445.75, _
        269.25, 435, 266.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 424.25, 263.25, 400.25, _
        265.3749606299, 390.75, 267.75
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorBackground1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
        .Solid
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    
    ActiveSheet.Shapes.AddShape(msoShapeOval, 402, 297, 24.75, 24.75).Select
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
        .Solid
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 386.25, 254.25)
        .AddNodes msoSegmentLine, msoEditingAuto, 397.5, 269.25
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 411, 251.25)
        .AddNodes msoSegmentLine, msoEditingAuto, 422.25, 266.25
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 436.5, 250.5)
        .AddNodes msoSegmentLine, msoEditingAuto, 430.5, 264.75
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    
    ' 右目
        With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 255.75, 271.5)
        .AddNodes msoSegmentCurve, msoEditingAuto, 245.5, 275.3749606299, _
        247.3749606299, 283.6250393701, 246, 291
        .AddNodes msoSegmentCurve, msoEditingAuto, 244.6250393701, 298.3749606299, _
        244.1249606299, 307.25, 247.5, 315.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 250.8749606299, 324.25, 258.5, _
        336.6249606299, 266.25, 342
        .AddNodes msoSegmentCurve, msoEditingAuto, 274, 347.3750393701, 283, _
        348.8749606299, 294, 348
        .AddNodes msoSegmentCurve, msoEditingAuto, 305, 347.1250393701, 325, _
        343.6249606299, 332.25, 336.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 339.5, 329.8750393701, 337.25, _
        316.5, 337.5, 306.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 337.75, 297, 338.75, 284.75, 333.75 _
        , 278.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 328.75, 271.75, 320.3750393701, 269 _
        , 307.5, 267.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 294.6249606299, 266.5, 266, _
        267.6250393701, 255.75, 271.5
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorBackground1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
        .Solid
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    ActiveSheet.Shapes.AddShape(msoShapeOval, 276, 295.5, 22.5, 22.5).Select
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
        .Solid
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 245.25, 259.5)
        .AddNodes msoSegmentLine, msoEditingAuto, 258, 273.75
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 275.25, 252.75)
        .AddNodes msoSegmentLine, msoEditingAuto, 279, 269.25
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 303.75, 255)
        .AddNodes msoSegmentLine, msoEditingAuto, 298.5, 267.75
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    
End Sub

 

雑ですがステファニー(仮)も

Sub Macro3()
'
' Macro3 Macro
'

'
    ' 輪郭
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 204, 306.75)
        .AddNodes msoSegmentCurve, msoEditingAuto, 209.75, 323.75, 215.25, 343.75, _
        226.5, 359.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 237.75, 374.75, 246.6250393701, _
        389.5, 271.5, 399.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 296.3750393701, 410, 340, 417.5, _
        375.75, 420.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 411.5, 424, 463.1250393701, 424.75 _
        , 486, 419.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 508.8749606299, 413.75, 501.75, _
        398.1249606299, 513, 387.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 524.25, 377.3750393701, _
        541.8750393701, 367.25, 553.5, 357
        .AddNodes msoSegmentCurve, msoEditingAuto, 565.1249606299, 346.75, _
        576.6250393701, 339.8750393701, 582.75, 326.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 588.8750393701, 312.6250393701, _
        587.6250393701, 296.25, 590.25, 275.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 592.8749606299, 254.25, _
        601.3749606299, 220.1249606299, 598.5, 200.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 595.6250393701, 180.3750393701, 574 _
        , 166.25, 573, 156
        .AddNodes msoSegmentCurve, msoEditingAuto, 572, 145.75, 587.75, 146.5, 592.5, _
        138.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 597.25, 131, 601.3750393701, 120.75 _
        , 601.5, 109.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 601.6249606299, 98.25, _
        599.6249606299, 82.75, 593.25, 71.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 586.8750393701, 59.75, 576.25, _
        46.3749606299, 563.25, 40.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 550.25, 34.6250393701, 529.25, _
        33.75, 515.25, 36
        .AddNodes msoSegmentCurve, msoEditingAuto, 501.25, 38.25, 488.8749606299, _
        44.3750393701, 479.25, 54
        .AddNodes msoSegmentCurve, msoEditingAuto, 469.6250393701, 63.6249606299, 465 _
        , 87.25, 457.5, 93.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 450, 100.25, 443.8750393701, _
        93.8749606299, 434.25, 93
        .AddNodes msoSegmentCurve, msoEditingAuto, 424.6250393701, 92.1249606299, _
        414.25, 86.5, 399.75, 88.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 385.25, 90.5, 357.3749606299, _
        104.6250393701, 347.25, 105
        .AddNodes msoSegmentCurve, msoEditingAuto, 337.1250393701, 105.3749606299, _
        342.3749606299, 97.6249606299, 339, 90.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 335.6250393701, 83.8750393701, _
        334.25, 71.25, 327, 63.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 319.75, 56.25, 307.3750393701, 50, _
        295.5, 45.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 283.6250393701, 41.5, 269.75, 33.75 _
        , 255.75, 38.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 241.75, 42.75, 220.5, 58, 211.5, _
        72.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 202.5, 87.5, 199.75, 112.1249606299 _
        , 201.75, 126.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 203.75, 141.3749606299, 224.75, _
        148.5, 223.5, 160.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 222.25, 172.5, 199.5, _
        182.6249606299, 194.25, 198.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 189, 214.8749606299, 190.1249606299 _
        , 238.8749606299, 192, 257.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 193.8749606299, 275.6249606299, _
        198.25, 289.75, 204, 306.75
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        .ForeColor.RGB = RGB(255, 102, 255)
        .Transparency = 0
        .Solid
    End With
    
    ' 鼻
    ActiveSheet.Shapes.AddShape(msoShapeOval, 379.5, 256.5, 44.25, 40.5).Select
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
        .Solid
    End With
    
    ' 口
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 325.5, 321)
        .AddNodes msoSegmentCurve, msoEditingAuto, 325.3749606299, 332.5, 325.25, 344 _
        , 333, 354
        .AddNodes msoSegmentCurve, msoEditingAuto, 340.75, 364, 361, 377.1250393701, _
        372, 381
        .AddNodes msoSegmentCurve, msoEditingAuto, 383, 384.8750393701, 384.5, 385.25 _
        , 399, 377.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 413.5, 369.25, 436.25, _
        351.1249606299, 459, 333
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With

    ' 左目
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 462.75, 139.5)
        .AddNodes msoSegmentCurve, msoEditingAuto, 453, 142.3750393701, 438.1249606299 _
        , 148.75, 431.25, 158.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 424.3749606299, 167.75, 420, 183.5 _
        , 421.5, 196.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 423, 209.5, 431.75, 227.25, 440.25 _
        , 236.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 448.75, 245.25, 461.6250393701, _
        248.1250393701, 472.5, 250.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 483.3749606299, 252.8749606299, _
        496.5, 252.8749606299, 505.5, 250.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 514.5, 248.1250393701, 521.75, _
        242.1250393701, 526.5, 236.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 531.25, 230.3750393701, 532.75, _
        224.6250393701, 534, 215.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 535.25, 205.8750393701, _
        537.1249606299, 190.75, 534, 180
        .AddNodes msoSegmentCurve, msoEditingAuto, 530.8750393701, 169.25, _
        522.6250393701, 157.25, 515.25, 150.75
        .AddNodes msoSegmentCurve, msoEditingAuto, 507.8749606299, 144.25, _
        498.1249606299, 142.6249606299, 489.75, 141
        .AddNodes msoSegmentCurve, msoEditingAuto, 481.3750393701, 139.3750393701, _
        472.5, 136.6249606299, 462.75, 139.5
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorBackground1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
        .Solid
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With

    ActiveSheet.Shapes.AddShape(msoShapeOval, 462.75, 177, 29.25, 54).Select
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
        .Solid
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 0
    End With

    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 438.75, 127.5)
        .AddNodes msoSegmentLine, msoEditingAuto, 446.25, 149.25
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 468, 128.25)
        .AddNodes msoSegmentLine, msoEditingAuto, 468, 143.25
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 497.25, 127.5)
        .AddNodes msoSegmentLine, msoEditingAuto, 492.75, 144.75
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With

    '右目
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 254.25, 192.75)
        .AddNodes msoSegmentCurve, msoEditingAuto, 254, 201.5, 252.75, 210.1249606299 _
        , 259.5, 220.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 266.25, 230.8750393701, 280.5, _
        249.75, 294.75, 255
        .AddNodes msoSegmentCurve, msoEditingAuto, 309, 260.25, 333.25, 254, 345, 252
        .AddNodes msoSegmentCurve, msoEditingAuto, 356.75, 250, 359.1250393701, 248, _
        365.25, 243
        .AddNodes msoSegmentCurve, msoEditingAuto, 371.3750393701, 238, 379.1250393701 _
        , 231.5, 381.75, 222
        .AddNodes msoSegmentCurve, msoEditingAuto, 384.3749606299, 212.5, _
        381.8750393701, 195.75, 381, 186
        .AddNodes msoSegmentCurve, msoEditingAuto, 380.1249606299, 176.25, _
        381.6249606299, 170.75, 376.5, 163.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 371.3750393701, 156.25, 360.75, _
        146.25, 350.25, 142.5
        .AddNodes msoSegmentCurve, msoEditingAuto, 339.75, 138.75, 326.75, _
        139.3749606299, 313.5, 141
        .AddNodes msoSegmentCurve, msoEditingAuto, 300.25, 142.6249606299, 279.5, _
        147.75, 270.75, 152.25
        .AddNodes msoSegmentCurve, msoEditingAuto, 262, 156.75, 263.5, 160.8750393701 _
        , 261, 168
        .AddNodes msoSegmentCurve, msoEditingAuto, 258.5, 175.1249606299, 254.5, 184, _
        254.25, 192.75
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorBackground1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
        .Solid
    End With
     With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With

    ActiveSheet.Shapes.AddShape(msoShapeOval, 303, 177.75, 29.25, 51).Select
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 0
    End With
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        .ForeColor.ObjectThemeColor = msoThemeColorText1
        .ForeColor.TintAndShade = 0
        .ForeColor.Brightness = 0
        .Transparency = 0
        .Solid
    End With

    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 282.75, 128.25)
        .AddNodes msoSegmentLine, msoEditingAuto, 289.5, 153
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 313.5, 127.5)
        .AddNodes msoSegmentLine, msoEditingAuto, 315, 150.75
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 350.25, 129.75)
        .AddNodes msoSegmentLine, msoEditingAuto, 347.25, 150
        .ConvertToShape.Select
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 0
    End With
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 10
    End With
End Sub

Written by masayuki.ozawa

4月 12th, 2014 at 11:00 pm

Posted in Office

Tagged with

Leave a Reply

*