preserve 保留以下EXCEL VBA模組畫面
Public Sub 金一丙()
Cells(1, 1).Value = "郭家銘"
End Sub
Public Sub 郭家銘迴圈()
For j = 1 To 20
Cells(j, 6).Value = j * j
Next
End Sub
VBA繪圖 VBA繪圖程式碼 'Dr Ian O'Connor, CPA. - located in Victoria, Australia. Option Explicit 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) ...
留言
張貼留言