[ 初めての方へ | 一覧(最新更新順) | 全文検索 | 過去ログ ]
『オートシェイプの塗り潰し無し』(どんまい)
塗り潰し無しで枠線無しのオートシェイプをマクロ記録しましたが、 以下の様になり、実行しましたら、塗り潰し無しになりません。 どこが違うのでしょうか?
Sub テキストオートシェイプ追加()
ActiveSheet.Shapes.AddShape(msoShapeRectangle, 187.5, 493.5, 107.25, 81.75). _
Select
Selection.Characters.Text = "テキスト"
With Selection.Characters(Start:=1, Length:=4).Font
.Name = "MS Pゴシック"
.FontStyle = "標準"
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoFalse
End Sub
どうも「Selection.ShapeRange.Fill.Solid」を実行すると「図の塗りつぶし」が初期化されるようです。 「Selection.ShapeRange.Fill.Solid」を「Selection.ShapeRange.Fill.Visible = msoFalse」の前にしてみてください。 (独覚)
塗りつぶしをなしにするのであれば、
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Line.Visible = msoFalse
だけの設定でよいかと思います。
(Mook)
[ 一覧(最新更新順) ]
YukiWiki 1.6.7 Copyright (C) 2000,2001 by Hiroshi Yuki.
Modified by kazu.