'https://excelatfinance.com/xlf19/xlf-qg-add-blue-circle.php
Option Explicit
Const topleft As String = "C5" ' anchor cell
Const diam As Integer = 100 ' 宣告常數constant diam 100
Dim Shp As Shape 'global variables全域變數
' ===========================
Sub 劉任昌()
Dim TLCleft As Double
Dim TLCtop As Double
Dim i As Integer '宣告整數integer i
For i = 1 To 20 'write a loop單引號註解
TLCleft = 20 * i '距離左邊left
TLCtop = 20 * i '距離上面top
'使用中的試算表active sheet. addshape(type, left, top, width, height)
Set Shp = ActiveSheet.Shapes.AddShape(msoShapeOval, TLCleft, TLCtop, 2 * diam, diam)
With Shp
.Fill.Visible = msoFalse
.Line.Weight = 10
.Line.ForeColor.Brightness = 0.4
.ThreeD.BevelTopType = msoBevelCircle
End With
Next
With Cells(1, 1)
.Value = "劉任昌大帥哥" '在儲存格1,1放入字串
.Interior.Color = RGB(0, 0, 255)
.Columns.AutoFit
With .Font
.Size = 30
.Color = RGB(255, 255, 255)
.Bold = True
End With
End With
End Sub
Sub 劉任昌刪除()
For Each Shp In ActiveSheet.Shapes 'Shp 共用的物件宣告成全域變數
Shp.Delete 'programming .method delete .property, font color
Next
End Sub
https://d11036120.blogspot.com/2021/11/excel-vbajavascript.html
回覆刪除https://laiyuwen36.blogspot.com/2021/11/excel-vbajava.html
回覆刪除