吳睿捷VBA雙迴圈Loop與JavaScript

  畫圖畫面


畫圖VBA程式碼


Rem http://excelatfinance.com/xlfl9/xlf-qg-add-blue-circle.php
Rem 2021/11/29吳睿捷提示
Option Explicit
Const topleft As String = "C5"  ' anchor cell
Const diam As Integer = 100     ' points宣告常數constant變數diameter直徑radius半徑
Dim Shp As Shape  '宣告dim 變數Shp是圖形Shape  global
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
        y = 20 * i '往下的方向出現物件addshape增加圖形type mso微軟
 
        Set Shp = ActiveSheet.Shapes.AddShape(Type:=msoShapeOval, _
                                              Left:=x, Top:=y, _
                                              Width:=diam, Height:=diam)
        With Shp
                .Fill.Visible = msoFalse
                .Line.Weight = 10
                .Line.ForeColor.Brightness = 0.4
                .ThreeD.BevelTopType = msoBevelCircle
        End With
Next
End Sub

留言

這個網誌中的熱門文章

吳睿捷VBA雙迴圈Loop與JavaScript迴圈

D11017202吳睿捷 股票圖

VBA巨集Macro程式設計