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

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

( )1. 底下程式碼執行結果會在即時視窗出現
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
( )2. 切換設計模式及執行模式圖示是(1) (2) (3) (4)
( )3. 在Excel VBA中不等於的符號是(1)== (2)!= (3)<> (4)>=<
( )4. 在Excel 2007要儲存含有巨集的格式,檔案副檔名為(1)xlsm (2)xlsx (3)csv (4)txt
( )5. 在Excel VBA中大於等於的符號是(1)<= (2)<> (3)>= (4)=>
( )6. 工作表如圖,若執行底下程式會顯示什麼?
Sub test2()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(i + 1, 1).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub(1)16 (2)17 (3)18 (4)15
( )7. 在Excel VBA中下列那一個敍述是錯的(1)i+1=i (2)let i=i+1 (3)i=i (4)i=-i
( )8. 工作表如圖,若執行底下程式會顯示什麼?
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)41 (2)86 (3)62 (4)38
( )9. 在Excel VBA的即時視窗輸入 print 1+2+3 請問會顯示(1)0 (2)123 (3)1+2+3 (4)6
( )10. 在Excel 中要如何在變數d設定為日期1972/3/31(1)d="1972/3/31" (2)d='1972/3/31' (3)d=1972/3/31 (4)d=#1972/3/31#
( )11. 在Excel VBA中小於等於的符號是(1)>= (2)=> (3)<= (4)=<
( )12. 在ExcelVBA中要使用除(只取整數的商)要用那一個?(1)/ (2)* (3)mod (4)\
( )13. 插入按鈕是那個圖示(1) (2) (3) (4)
( )14. 圖中的數字5代表(1)range (2)cell (3)row (4)column
( )15. 在Excel VBA的即時視窗輸入 print len(trim(" 1+2=3 ")) 請問會顯示(1)4 (2)5 (3)6 (4)0
( )16. 圖中的數字1代表(1)column(行) (2)worksheet (3)cell (4)row(列)
( )17. 在Excel VBA的即時視窗輸入 print 1 & 2 + 3 請問會顯示(1)123 (2)6 (3)0 (4)15
( )18. 在Excel VBA的中斷模式時,按那一個按鈕可以逐一行執行(1)F5 (2)shift+F8 (3)Ctrl+Shift+F9 (4)F8
( )19. 底下程式碼執行結果會在即時視窗出現
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
( )20. 為了使亂數每次產生的都不一樣,可以在產生亂數前加入那一個指令(1)int (2)dim (3)rand (4)randomize
( )21. 在Excel中工作表的英文名稱為(1)Application (2)workbook (3)worksheet (4)excel
( )22. 底下程式執行時會在即時視窗顯示什麼
Sub test7()
    Dim i As Integer
    Dim std_no(5) As Integer
    
    For i = 1 To 5
        std_no(i - 1) = i - 1
    Next
    
    Debug.Print std_no(3)   '顯示陣列索引為3的資料
End Sub(1)4 (2)1 (3)2 (4)3
( )23. 在ExcelVBA中要將3顯示在即時視窗要如何使用(1)echo 3 (2)debug.echo 3 (3)print 3 (4)debug.print 3
( )24. 在Excel VBA中要宣告變數I為整數語法為(1)dim I as date (2)dim I as integer (3)dim I as single (4)dim I as string
( )25. 底下程式執行時會在即時視窗顯示什麼
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

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

詳解: