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

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

( )1. 程式碼如下

For i= 1 to 9 
    For j=1 to 9
        cells(i,j).value=i*j
    Next j
Next i當i=5,j=3時,執行結果(1)在儲存格C5顯示15 (2)在儲存格E3顯示3 (3)在儲存格C5顯示5 (4)在儲存格E3顯示15
( )2. 在Excel VBA的即時視窗輸入 print left("N1234",1) 請問會顯示(1)4 (2)1 (3)2 (4)N
( )3. 在Excel VBA的即時視窗輸入 print 1 & 2 & 3 請問會顯示(1)1+2+3 (2)6 (3)123 (4)0
( )4. 在Excel中活頁簿的英文名稱為(1)worksheet (2)excel (3)Application (4)workbook
( )5. 在Excel VBA的即時視窗輸入 print len(trim(" 1+2=3 ")) 請問會顯示(1)4 (2)5 (3)6 (4)0
( )6. 在Excel VBA的即時視窗輸入 print right("N1234",1) 請問會顯示(1)N (2)4 (3)1 (4)2
( )7. 底下程式執行時會在即時視窗顯示什麼
Sub test1()
    Dim no As Variant
    no = Array(1, 2, 3, 4, 5)
    Debug.Print no(1)   '顯示陣列索引為1的資料
End Sub(1)4 (2)1 (3)2 (4)3
( )8. 工作表如圖,若執行底下程式會顯示什麼?
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)41 (2)86 (3)62 (4)38
( )9. 工作表如圖,若執行底下程式會顯示什麼?
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
( )10. 底下程式執行時會在即時視窗顯示什麼
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)7 (2)9 (3)3 (4)5
( )11. MsgBox的回傳值型別是(1)integer (2)string (3)single (4)date
( )12. 在ExcelVBA中要將3顯示在即時視窗要如何使用(1)debug.echo 3 (2)print 3 (3)debug.print 3 (4)echo 3
( )13. 請問此圖那一個的真值表(1)not (2)xor (3)or (4)and
( )14. 請問此圖程式執行結果(1)在變數i<5時會中斷程式 (2)在變數i>5時會中斷程式 (3)在變數i不等於5時會中斷程式 (4)在變數i=5時會中斷程式
( )15. 圖中的數字2代表(1)worksheet (2)range (3)cell (4)workbook
( )16. 在Excel VBA的即時視窗輸入 print lcase("How are you")請問會顯示(1)how are you (2)How Are You (3)HOW ARE YOU (4)How are you
( )17. 在Excel VBA中小於等於的符號是(1)>= (2)=> (3)<= (4)=<
( )18. 底下程式碼執行結果會在即時視窗出現
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)5,1 (2)5,-1 (3)0,5 (4)5,0
( )19. 在ExcelVBA中要使用餘數要用那一個?(1)mod (2)\ (3)/ (4)*
( )20. 請問此圖那一個的真值表(1)xor (2)or (3)and (4)not
( )21. 工作表如圖,若執行底下程式會顯示什麼?
Sub test3()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(i, 2).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub
(1)5 (2)6 (3)7 (4)8
( )22. 在Excel VBA的即時視窗輸入 print mid("N1234",2,1) 請問會顯示(1)1 (2)2 (3)3 (4)N
( )23. 圖中的數字4代表(1)range (2)cell (3)workbook (4)worksheet
( )24. 請問此圖i若變成95,執行時會在即時視窗顯示(1)丁 (2)甲 (3)乙 (4)丙
( )25. 請問此圖那一個的真值表(1)not (2)xor (3)or (4)and

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

詳解: