這個網誌中的熱門文章
粗體執行
楊菘峻Excel+VBA程式設計
107Excel 108Excel 我的Excel試算表 楊菘峻 Shift+Tab Shift 變速檔 Shift gear preserve=保留 左Shift+Tab 右邊Tab gear齒輪 Enter 計算 註解 shift 改變 shift 連續 16384 =COLUMN(天涯海角) Alt Ctrl 多重選擇 1048576 =ROW(天涯海角) Alternative 另一個選擇 control 16384 =POWER(2,14) ctrl 往上 1048576 =POWER(2,20) ctrl 往左 ctrl 往右 X24 16224 ctrl 往下 F6 156 楊 =LEFT(天涯海角,1) D4 4 楊菘 =LEFT(天涯海角,2) 16384 =SUM(D8:D10) 菘峻 =RIGHT(天涯海角,2) 重選 =MID(B5,2,2) 我的ExcelVBA首次學習 變數variables應該要宣告 pre=preserve保留 Option Explicit '要求所有變數必須宣告才能使用 Dim i, j As Integer Dimension 宣告指令 Public Sub 楊菘峻() Cells(1, 1).Value = "楊菘峻學習VBA" Cells(1, 1).Font.Size = 20 Cells(1, 1).Font.Color = (256,0,0) End Sub Public Sub 孫悟空() For i = 2 To 7 For j = 1 To 6 Cells(i, j).Value = i * j Cells(i, j).Font.Color = RGB(0,0,255) Cells(i, j).Font.Bold = True Next Next End Sub ExcelVBA雙迴圈 Option Explicit '必須宣告所有變數variables Dim i, j As Integer '宣告dimension i, j 是整數in...

留言
張貼留言