EXCEL VBA雙迴圈JavaScript雙迴圈
VBA迴圈畫圖 VBA迴圈畫圖程式碼 '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...