vba繪圖

Const topleft As String = "C5" ' anchor cell Const diam As Integer = 100 ' points Dim Shp As Shape '全域變數global variables 每一個副程式都可以用 Sub 楊翔宇() Dim TLCleft As Double '區域local variables Dim TLCtop As Double Dim i As Integer For i = 1 To 30 TLCleft = 20 * i TLCtop = 20 * i 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 Next With Cells(1, 1) '物件 子物件 屬性 方法 .Value = "楊翔宇" .Interior.Color = RGB(200, 200, 0) With .Font .Size = 20 .Color = RGB(255, 255, 255) .Bold = True End With End With End Sub Sub 刪除() '在113影片下有程式碼 For Each Shp In ActiveSheet.Shapes Shp.Delete '將使用中的的工作表的每個圖形刪除 Next End Sub

留言

這個網誌中的熱門文章

楊翔宇期末考

期貨選擇權

楊翔宇time