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

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

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

End Sub
(1)38 (2)41 (3)86 (4)62
( )2. 在Excel VBA的即時視窗輸入 print mid("N1234",2,1) 請問會顯示(1)1 (2)2 (3)3 (4)N
( )3. 請問此圖程式執行結果(1)在變數i不等於5時會中斷程式 (2)在變數i=5時會中斷程式 (3)在變數i<5時會中斷程式 (4)在變數i>5時會中斷程式
( )4. 請問此圖那一個的真值表(1)xor (2)or (3)and (4)not
( )5. 在Excel VBA中列的英文為(1)cell (2)x (3)row (4)column
( )6. 在Excel VBA參數與參數中間是用什麼符號區隔(1)減號 (2)逗點 (3)等號 (4)冒號
( )7. 在ExcelVBA中要使用餘數要用那一個?(1)\ (2)/ (3)* (4)mod
( )8. 在Excel VBA中物件方法的圖示為(1) (2) (3) (4)
( )9. MsgBox的回傳值型別是(1)integer (2)string (3)single (4)date
( )10. 在Excel VBA中程式碼註解是用什麼字元(1)單引號 (2)雙斜線 (3)冒號 (4)分號
( )11. 使用debug.print rnd(1)不可能產生那一個數字(1)1 (2)0 (3)0.99 (4)0.5
( )12. 底下程式碼執行結果會在即時視窗出現
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)4,10 (2)3,7 (3)4,11 (4)3,8
( )13. 工作表如圖,若執行底下程式會顯示什麼?
Sub test1()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(i, 1).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub(1)16 (2)17 (3)18 (4)15
( )14. 底下程式碼執行結果會在執行視窗出現
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)4,10 (2)3,10 (3)10,10 (4)3,13
( )15. 圖中的數字5代表(1)cell (2)row (3)column (4)range
( )16. 在Excel VBA的即時視窗輸入 print 1+2+3 請問會顯示(1)0 (2)123 (3)1+2+3 (4)6
( )17. 底下程式執行時會在即時視窗顯示什麼
Sub test3()
    Dim no As Variant
    no = Array(1, 2, 3, 4, 5)
    Debug.Print UBound(no)   '顯示陣列最大索引值
End Sub(1)5 (2)0 (3)3 (4)4
( )18. 變數的命名規則(1)第一個字元需英文字母 (2)變數名稱不可包含空白、點、,逗號或其他特殊字元 (3)變數名稱不可為關鍵字,例如for、next、while、public等 (4)以上皆是
( )19. 程式碼如下
For i= 1 to 10 
      cells(1,i).value=1
Next i
此程式的執行結果?(1)在儲存格A1:A10填入1到10 (2)在儲存格A1:A10都顯示1 (3)在儲存格A1:J1填入1到10 (4)在儲存格A1:J1填入1到1
( )20. 在Excel VBA中不等於的符號是(1)<> (2)>=< (3)== (4)!=
( )21. 請問此圖那一個的真值表(1)xor (2)or (3)and (4)not
( )22. 工作表如圖,若執行底下程式會顯示什麼?
Sub test10()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(6, i).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub(1)3 (2)4 (3)1 (4)2
( )23. 圖中的數字3代表(1)column (2)range (3)cell (4)row
( )24. 底下程式執行時會在即時視窗顯示什麼
Sub test5()
    Dim std_no As Variant
    no = Split(",國文,英文,數學,理化", ",")
    Debug.Print no(3)   '顯示陣列索引為3的資料
End Sub(1)數學 (2)理化 (3)國文 (4)英文
( )25. 程式碼如下
For i= 1 to 10 
      cells(1,i).value=i
Next i
此程式的執行結果?(1)在儲存格A1:A10都顯示1 (2)在儲存格A1:J1填入1到10 (3)在儲存格A1:J1填入1到1 (4)在儲存格A1:A10填入1到10

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

詳解: