<   Excel VBA實務班(第二班)測驗(全部95題任選25題)   >

免費免註冊,彰化一整天線上測驗:http://exam.bestdaylong.com/test2226.htm

( )1. 底下程式碼執行結果會在即時視窗出現
Sub test6()
    Dim i, n As Integer
    
    n = 0
    
    For i = 1 To 10
       
       If i Mod 3 = 1 Then
          n = n + 1
       End If
       
       If n = 3 Then
          Exit For
       End If
       
    Next i
    
    Debug.Print n & "," & i
    
End Sub(1)3,8 (2)4,10 (3)3,7 (4)4,11
( )2. 底下程式碼執行結果會在執行視窗出現
Sub test1()
    Dim i, n As Integer
    n = 0
    
    For i = 1 To 9 Step 4
       n = n + 1
    Next i
    Debug.Print n & "," & i
    
End Sub(1)10,10 (2)3,13 (3)4,10 (4)3,10
( )3. 底下程式執行時會在即時視窗顯示什麼
Sub test4()
    Dim std_no As Variant
    no = Split("國文,英文,數學,理化", ",")
    Debug.Print no(3)   '顯示陣列索引為3的資料
End Sub(1)數學 (2)理化 (3)國文 (4)英文
( )4. 底下程式執行時會在即時視窗顯示什麼
Sub test2()
    Dim no As Variant
    no = Array(1, 2, 3, 4, 5)
    Debug.Print no(5)   '顯示陣列索引為5的資料
End Sub(1)3 (2)4 (3)1 (4)出現陣列索引超出範圍
( )5. 在Excel VBA中小於等於的符號是(1)=< (2)>= (3)=> (4)<=
( )6. 在Excel中工作表的英文名稱為(1)workbook (2)worksheet (3)excel (4)Application
( )7. 在Excel VBA中程式碼註解是用什麼字元(1)單引號 (2)雙斜線 (3)冒號 (4)分號
( )8. 程式碼如下
For i= 1 to 10 
      cells(1,i).value=i
Next i
此程式的執行結果?(1)在儲存格A1:A10填入1到10 (2)在儲存格A1:A10都顯示1 (3)在儲存格A1:J1填入1到10 (4)在儲存格A1:J1填入1到1
( )9. 圖中的數字3代表(1)column (2)range (3)cell (4)row
( )10. 請問此圖那一個的真值表(1)xor (2)or (3)and (4)not
( )11. 底下程式執行時會在即時視窗顯示什麼
Sub test8()
    Dim i As Integer
    Dim std_no(5) As Integer
    
    For i = 1 To 5
        std_no(i - 1) = i * 2 - 1
    Next
    
    Debug.Print std_no(3)   '顯示陣列索引為3的資料
End Sub(1)3 (2)5 (3)7 (4)9
( )12. 在Excel VBA的即時視窗輸入 print 10 mod 3 請問會顯示(1)1 (2)1.33 (3)0 (4)3
( )13. 圖中的數字4代表(1)worksheet (2)range (3)cell (4)workbook
( )14. 圖中的數字2代表(1)worksheet (2)range (3)cell (4)workbook
( )15. 在Excel VBA的中斷模式時,按那一個按鈕可以逐一行執行(1)Ctrl+Shift+F9 (2)F8 (3)F5 (4)shift+F8
( )16. 在Excel VBA中下列那一個敍述是錯的(1)i+1=i (2)let i=i+1 (3)i=i (4)i=-i
( )17. 工作表如圖,若執行底下程式會顯示什麼?
Sub test2()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(i + 1, 1).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub(1)15 (2)16 (3)17 (4)18
( )18. 底下程式執行時會在即時視窗顯示什麼
Sub test5()
    Dim std_no As Variant
    no = Split(",國文,英文,數學,理化", ",")
    Debug.Print no(3)   '顯示陣列索引為3的資料
End Sub(1)數學 (2)理化 (3)國文 (4)英文
( )19. 工作表如圖,若執行底下程式會顯示什麼?
Sub test3()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(i, 2).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub
(1)6 (2)7 (3)8 (4)5
( )20. 程式碼如下
For i= 1 to 10 
      cells(i,1).value=i
Next i
此程式的執行結果?(1)在儲存格A1:A10填入1到10 (2)在儲存格A1:A10都顯示1 (3)在儲存格A1:J1填入1到10 (4)在儲存格A1:J1填入1到1
( )21. 底下程式碼執行結果會在即時視窗出現
Sub test3()
    Dim i, n As Integer
    
    n = 0
    
    For i = 5 To 1 Step -1
       n = n + 1
    Next i
    Debug.Print n & "," & i
    
End Sub(1)0,5 (2)5,0 (3)5,1 (4)5,-1
( )22. 圖中的數字1代表(1)column(行) (2)worksheet (3)cell (4)row(列)
( )23. 工作表如圖,若執行底下程式會顯示什麼?
Sub test1()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(i, 1).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub(1)17 (2)18 (3)15 (4)16
( )24. 工作表如圖,若執行底下程式會顯示什麼?
Sub test9()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(1, i).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub(1)5 (2)6 (3)4 (4)3
( )25. 在Excel VBA中要宣告變數I為整數語法為(1)dim I as string (2)dim I as date (3)dim I as integer (4)dim I as single

解答:
001.【3】002.【2】003.【2】004.【4】005.【4】006.【2】007.【1】008.【3】009.【1】010.【2】
011.【3】012.【1】013.【2】014.【4】015.【2】016.【1】017.【2】018.【1】019.【1】020.【1】
021.【2】022.【3】023.【1】024.【1】025.【3】

詳解: