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

輸出

Excel學習


Option Explicit      '必須宣告所有變數variables
Dim i, j As Integer '宣告dimension i, j 是整數integer

Public Sub RayWu()
  Cells(1, 1).Value = "RayWu xxx"
  Cells(1, 1).Font.Size = 20
  Cells(1, 1).Interior.Color = RGB(128, 0, 0)
  Cells(1, 1).Font.Color = RGB(255, 255, 255)
End Sub
Public Sub RayWu迴圈()
   For i = 2 To 10
      For j = 1 To 6
        Cells(i, j).Value = (2010 + i) & "年"
    Next
   Next
End Sub

留言

這個網誌中的熱門文章

D11017202吳睿捷 股票圖

VBA巨集Macro程式設計