|
もしかして表示文字の作りかたが分からないのかな?
たまたま昨日遊びでデジタル文字の作り方を勉強してたので
書いてみます。
自動記録に毛が生えた程度ですが。
シェイプで台形を作り、コピーし90度回転、二つの台形を
結合します。
Sub test()
Dim tp As Single
Dim lt As Single
Dim wd As Single
Dim ht As Single
Dim r As Range
Dim sp As Object
Dim myarray() As Variant
Dim i As Integer
Set r = ActiveCell
lt = r.Left
tp = r.Top
wd = r.Offset(, 1).Left - r.Left
ht = r.Offset(1).Top - r.Top
ActiveSheet.Shapes.AddShape(msoShapeTrapezoid, lt, tp, wd, ht).Name = "SP1"
ActiveSheet.Shapes("SP1").Duplicate.Name = "SP2"
With ActiveSheet.Shapes("SP2")
.IncrementRotation 180#
.Top = ActiveSheet.Shapes("SP1").Top - ht
.Left = lt
ActiveSheet.Shapes("SP1").Top = .Top + .Height
End With
i = -1
For Each sp In ActiveSheet.DrawingObjects
i = i + 1
ReDim Preserve myarray(0 To i)
myarray(i) = sp.Name
Next
ActiveSheet.Shapes.Range(myarray).Group.Name = "G"
End Sub
|
|