’テキストボックスを透明化するコード

With tex
            .Fill.Transparency = 1
            .Line.Transparency = 1

 

 

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

下の代わりに置換する
        With tex
            .Fill.ForeColor.RGB = RGB(155, 194, 230) '背景色
            .Line.ForeColor.RGB = RGB(155, 194, 230) '枠線色

 

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

Sub 選択範囲の図形をアクティブ()
    Dim shp As shape
    Dim rng As Range
    Dim ws As Worksheet
    
    ' 選択範囲を取得
    Set rng = Selection
    ' アクティブなワークシートを取得
    Set ws = ActiveSheet
    
    ' ワークシート内の全ての図形をループ
    For Each shp In ws.Shapes
        ' 図形が選択範囲内にあるかをチェック
        If Not Intersect(rng, shp.TopLeftCell) Is Nothing Then
            ' 図形を選択
            shp.Select Replace:=False
        End If
    Next shp
End Sub

 

ーーーーーーーーーーーーーーーーーーーー

図形を反転させるには    

.Rotation = 180 ' 図形を180度回転

 

With shape2
    .Fill.ForeColor.RGB = RGB(255, 230, 153)
    .Line.ForeColor.RGB = RGB(0, 0, 0)
    .TextFrame.Characters.Text = ""
    .TextFrame.Characters.Font.Size = 9
    .TextFrame.VerticalOverflow = xlOartVerticalOverflowOverflow
    .TextFrame2.VerticalAnchor = msoAnchorMiddle
    .TextFrame2.TextRange.Font.Fill.ForeColor.RGB = RGB(0, 0, 0)
    .Rotation = 180 ' 図形を180度回転
    .Select
    End With