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

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

( )1. 使用debug.print rnd(1)不可能產生那一個數字(1)1 (2)0 (3)0.99 (4)0.5
( )2. 為了使亂數每次產生的都不一樣,可以在產生亂數前加入那一個指令(1)rand (2)randomize (3)int (4)dim
( )3. 程式碼如下

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)在儲存格E3顯示3 (2)在儲存格C5顯示5 (3)在儲存格E3顯示15 (4)在儲存格C5顯示15
( )4. 工作表如圖,若執行底下程式會顯示什麼?
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
( )5. 在Excel 2007要儲存含有巨集的格式,檔案副檔名為(1)csv (2)txt (3)xlsm (4)xlsx
( )6. 在Excel物件的使用方式中是用什麼來表示階層(1)冒號 (2)減號 (3)句號 (4)等號
( )7. 工作表如圖,若執行底下程式會顯示什麼?
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
( )8. 工作表如圖,若執行底下程式會顯示什麼?
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
( )9. 在ExcelVBA中要將3顯示在即時視窗要如何使用(1)echo 3 (2)debug.echo 3 (3)print 3 (4)debug.print 3
( )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)3 (2)4 (3)1 (4)2
( )11. 圖中的數字1代表(1)column(行) (2)worksheet (3)cell (4)row(列)
( )12. 在Excel VBA中物件方法的圖示為(1) (2) (3) (4)
( )13. 在Excel VBA的即時視窗輸入 print left("N1234",1) 請問會顯示(1)2 (2)N (3)4 (4)1
( )14. 在Excel VBA的中斷模式時,按那一個按鈕可以逐一行執行(1)Ctrl+Shift+F9 (2)F8 (3)F5 (4)shift+F8
( )15. 程式碼如下
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
( )16. 下列那一個Excel VBA語法是正確的(1)excel.range("a1").text=123 (2)range(a1).value=123 (3)cells("a1").value=123 (4)cells(1,1)=123
( )17. MsgBox的回傳值型別是(1)string (2)single (3)date (4)integer
( )18. 在Excel VBA中要顯示一段文字hello那一段語法是對的(1)say hello (2)msgbox hello (3)msgbox "hello" (4)say "hello"
( )19. 在Excel VBA的即時視窗輸入 print 1 & 2 + 3 請問會顯示(1)6 (2)0 (3)15 (4)123
( )20. 使用array函數建立陣列,型別必須為(1)variant (2)int (3)string (4)date
( )21. 在Excel VBA中要宣告變數I為字串語法為(1)dim I as date (2)dim I as integer (3)dim I as single (4)dim I as string
( )22. 工作表如圖,若執行底下程式會顯示什麼?
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
( )23. 在Excel VBA的即時視窗輸入 print instr("1+2=3","=") 請問會顯示(1)4 (2)1 (3)2 (4)3
( )24. 在Excel VBA中物件屬性的圖示為(1) (2) (3) (4)
( )25. 變數的命名規則(1)變數名稱不可包含空白、點、,逗號或其他特殊字元 (2)變數名稱不可為關鍵字,例如for、next、while、public等 (3)以上皆是 (4)第一個字元需英文字母

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

詳解: