王佑丞Excel與JavaScript迴圈pre

輸出

EXCEL學習

'變數variables應該要宣告 pre=preserve保留
Option Explicit '要求所有變數必須宣告才能使用
Dim i, j As Integer
'Dimension 宣告指令

Public Sub 王佑丞()
   Cells(1, 1).Value = 12345
   Cells(1, 1).Font.Color = RGB(0, 0, 256)
   Cells(1, 1).Font.Bold = True
End Sub

Public Sub 豬八戒()
  For i = 1 To 7
    For j = 1 To 5
        Cells(i, j).Value = i * j
    Next
  Next
End Sub

留言

這個網誌中的熱門文章

王佑丞100結構化程式設計

王佑丞