許程程VBA雙迴圈Loop與JavaScript迴圈 VBA AddShape
VBA迴圈畫圖 VBA迴圈畫圖程式碼 Dim Shp As Shape '宣告變數Shp是 圖形 全域變數global 非區域變數local Sub 許程程刪除() For Each Shp In ActiveSheet.Shapes Shp.Delete '刪除使用中試算表ActiveSheet的所有圖形Shapes Next End Sub ' =========================== Sub 許程程() Dim Shp As Shape '宣告變數Shp是 圖形 Dim x As Double '宣告變數x是倍數經度實數Double Dim y As Double '宣告變數y是倍數經度實數Double Dim i As Integer '宣告變數i是整數Double For i = 1 To 20 '寫迴圈 x = 20 * i y = 20 * i Set Shp = ActiveSheet.Shapes.AddShape(msoShapeOval, x, y, 30, 60 ) 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放入字串string .Interior.Color = RGB(0, 0, 255) 'interior desing室內設計 With .Font .Size = 24 .Bold = True .Color = RGB(255, 255, 255) End With End With End Sub JavaScript雙迴圈 輸出 EXCEL VBA雙迴圈 ...