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

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

( )1. 在Excel VBA中不等於的符號是(1)== (2)!= (3)<> (4)>=<
( )2. 圖中的數字1代表(1)cell (2)row(列) (3)column(行) (4)worksheet
( )3. 圖中的數字2代表(1)range (2)cell (3)workbook (4)worksheet
( )4. 底下程式執行時會在即時視窗顯示什麼
Sub test1()
    Dim no As Variant
    no = Array(1, 2, 3, 4, 5)
    Debug.Print no(1)   '顯示陣列索引為1的資料
End Sub(1)3 (2)4 (3)1 (4)2
( )5. 在Excel VBA的即時視窗輸入 print len(trim(" 1+2=3 ")) 請問會顯示(1)0 (2)4 (3)5 (4)6
( )6. 在Excel VBA的即時視窗輸入 print 5/2 請問會顯示(1)1 (2)0 (3)2.5 (4)2
( )7. 在Excel VBA中要宣告變數I為日期語法為(1)dim I as integer (2)dim I as single (3)dim I as string (4)dim I as date
( )8. 底下程式執行時會在即時視窗顯示什麼
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)5 (2)7 (3)9 (4)3
( )9. 請問此圖程式執行結果(1)在變數i>5時會中斷程式 (2)在變數i不等於5時會中斷程式 (3)在變數i=5時會中斷程式 (4)在變數i<5時會中斷程式
( )10. 程式碼如下

sub test()
    Dim i As Integer
    
    For i = 1 To 10
        Cells(i + 1, 1).Value = 11 - i
    Next i

end sub(1)在儲存格D2:D11顯示10到1的數字 (2)在儲存格A2:A11顯示10到1的數字 (3)在儲存格B2:B11顯示10到1的數字 (4)在儲存格C2:C11顯示10到1的數字
( )11. 在Excel VBA中大於等於的符號是(1)=> (2)<= (3)<> (4)>=
( )12. 程式碼如下
For i= 1 to 10 
      cells(i,1).value=i
Next i
此程式的執行結果?(1)在儲存格A1:A10都顯示1 (2)在儲存格A1:J1填入1到10 (3)在儲存格A1:J1填入1到1 (4)在儲存格A1:A10填入1到10
( )13. 在Excel VBA中物件屬性的圖示為(1) (2) (3) (4)
( )14. 工作表如圖,若執行底下程式會顯示什麼?
Sub test5()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(i + 2, 3).Value <> ""
       i = i + 1
    Loop
    
    MsgBox Cells(i + 1, 3).Value

End Sub(1)86 (2)62 (3)38 (4)41
( )15. 底下程式碼執行結果會在即時視窗出現
Sub test4()
    Dim i, n As Integer
    
    n = 0
    
    For i = 5 To 1 Step -1
       n = n + 1
       i = i - 1
    Next i
    Debug.Print n & "," & i
    
End Sub(1)5,0 (2)5,-2 (3)3,0 (4)3,-1
( )16. 底下程式碼執行結果會在即時視窗出現
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
( )17. 底下程式執行時會在即時視窗顯示什麼
Sub test4()
    Dim std_no As Variant
    no = Split("國文,英文,數學,理化", ",")
    Debug.Print no(3)   '顯示陣列索引為3的資料
End Sub(1)國文 (2)英文 (3)數學 (4)理化
( )18. 在Excel VBA的即時視窗輸入 print 5\2 請問會顯示(1)2.5 (2)2 (3)1 (4)0
( )19. 在Excel VBA的即時視窗輸入 print len("中文字abc")請問會顯示(1)6 (2)9 (3)3 (4)0
( )20. 在Excel VBA的即時視窗輸入 print 10 mod 3 請問會顯示(1)1 (2)1.33 (3)0 (4)3
( )21. 請問此圖那一個的真值表(1)xor (2)or (3)and (4)not
( )22. 工作表如圖,若執行底下程式會顯示什麼?
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)86 (2)62 (3)38 (4)41
( )23. 工作表如圖,若執行底下程式會顯示什麼?
Sub test6()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(i + 1, 3).Value <> "" Or Cells(i + 2, 3).Value <> ""
       i = i + 1
    Loop
    
    MsgBox Cells(i, 3).Value

End Sub(1)50 (2)59 (3)62 (4)41
( )24. 在Excel VBA中物件方法的圖示為(1) (2) (3) (4)
( )25. inputbox的回傳值型別是(1)single (2)date (3)integer (4)string

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

詳解: