廖妤涵EXCEL VBA雙迴圈JavaScript迴圈
VBA繪圖 VBA繪圖程式碼 Option Explicit Const topleft As String = "C5" ' anchor cell Const diam As Integer = 100 ' points Dim Shp As Shape '宣告dim 變數Shp是圖形Shape global Sub 廖妤涵() Dim TLCleft As Double 'local variables區域變數 Dim TLCtop As Double TLCleft = Range(topleft).Left TLCtop = Range(topleft).Top Set Shp = ActiveSheet.Shapes.AddShape(Type:=msoShapeOval, _ Left:=TLCleft, Top:=TLCtop, _ Width:=diam, Height:=diam) With Shp .Fill.Visible = msoFalse .Line.Weight = 10 .Line.ForeColor.Brightness = 0.4 .ThreeD.BevelTopType = msoBevelCircle End With End Sub Sub 廖妤涵() Dim x As Double '宣告 x 是倍精度double Dim y As Double '宣告 y 是倍精度double Dim i As Integer '選告整數i For i = 1 To 20 x = 20 y = 20 * i Set Shp = ActiveSheet.Shapes.AddShape(Type:...