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

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

( )1. 在Excel 2007要儲存含有巨集的格式,檔案副檔名為(1)xlsx (2)csv (3)txt (4)xlsm
( )2. 在Excel物件的使用方式中是用什麼來表示階層(1)等號 (2)冒號 (3)減號 (4)句號
( )3. 圖中的數字2代表(1)workbook (2)worksheet (3)range (4)cell
( )4. 在Excel VBA的即時視窗輸入 print 1+2+3 請問會顯示(1)6 (2)0 (3)123 (4)1+2+3
( )5. 工作表如圖,若執行底下程式會顯示什麼?
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)62 (2)41 (3)50 (4)59
( )6. 修改Excel按鈕顯示文字是使用那一個屬性(1)value (2)caption (3)name (4)text
( )7. 工作表如圖,若執行底下程式會顯示什麼?
Sub test8()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(1, i + 1).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub(1)4 (2)3 (3)5 (4)6
( )8. 在Excel VBA中物件屬性的圖示為(1) (2) (3) (4)
( )9. 工作表如圖,若執行底下程式會顯示什麼?
Sub test9()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(1, i).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub(1)3 (2)5 (3)6 (4)4
( )10. 底下程式執行時會在即時視窗顯示什麼
Sub test6()
    Dim i As Integer
    Dim std_no(5) As Integer
    
    For i = 1 To 5
        std_no(i) = i
    Next
    
    Debug.Print std_no(3)   '顯示陣列索引為3的資料
End Sub(1)1 (2)2 (3)3 (4)4
( )11. 程式碼如下
For i= 1 to 10 
      cells(1,i).value=i
Next i
此程式的執行結果?(1)在儲存格A1:J1填入1到1 (2)在儲存格A1:A10填入1到10 (3)在儲存格A1:A10都顯示1 (4)在儲存格A1:J1填入1到10
( )12. 底下程式碼執行結果會在即時視窗出現
Sub test2()
    Dim i, n As Integer
    
    n = 0
    
    For i = 5 To 1
       n = n + 1
    Next i
    Debug.Print n & "," & i
    
End Sub(1)5,6 (2)5,0 (3)0,5 (4)0,6
( )13. 在Excel VBA的即時視窗輸入 print right("N1234",1) 請問會顯示(1)2 (2)N (3)4 (4)1
( )14. 在Excel VBA中要宣告變數I為整數語法為(1)dim I as single (2)dim I as string (3)dim I as date (4)dim I as integer
( )15. 工作表如圖,若執行底下程式會顯示什麼?
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
( )16. 底下程式碼執行結果會在即時視窗出現
Sub test5()
    Dim i, n As Integer
    
    n = 0
    
    For i = 1 To 10
       
       If i Mod 3 = 1 Then
          n = n + 1
       End If
       
    Next i
    
    Debug.Print n & "," & i
    
End Sub(1)3,10 (2)4,10 (3)5,10 (4)4,11
( )17. 在Excel VBA中大於等於的符號是(1)<= (2)<> (3)>= (4)=>
( )18. 底下程式執行時會在即時視窗顯示什麼
Sub test2()
    Dim no As Variant
    no = Array(1, 2, 3, 4, 5)
    Debug.Print no(5)   '顯示陣列索引為5的資料
End Sub(1)4 (2)1 (3)出現陣列索引超出範圍 (4)3
( )19. 底下程式碼執行結果會在即時視窗出現
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,11 (2)3,8 (3)4,10 (4)3,7
( )20. 圖中的數字4代表(1)workbook (2)worksheet (3)range (4)cell
( )21. 工作表如圖,若執行底下程式會顯示什麼?
Sub test1()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(i, 1).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub(1)18 (2)15 (3)16 (4)17
( )22. 底下程式碼執行結果會在執行視窗出現
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
( )23. 使用array函數建立陣列,型別必須為(1)date (2)variant (3)int (4)string
( )24. 程式碼如下
For i= 1 to 10 
      cells(i,1).value=1
Next i
此程式的執行結果?(1)在儲存格A1:J1填入1到10 (2)在儲存格A1:J1填入1到1 (3)在儲存格A1:A10填入1到10 (4)在儲存格A1:A10都顯示1
( )25. 在Excel VBA的即時視窗輸入 print lcase("How are you")請問會顯示(1)HOW ARE YOU (2)How are you (3)how are you (4)How Are You

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

詳解: