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

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

( )1. 在Excel VBA中要宣告變數I為整數語法為(1)dim I as integer (2)dim I as single (3)dim I as string (4)dim I as date
( )2. 在ExcelVBA中要使用除(只取整數的商)要用那一個?(1)\ (2)/ (3)* (4)mod
( )3. 底下程式碼執行結果會在即時視窗出現
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
( )4. 程式碼如下
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
( )5. 在Excel VBA的即時視窗輸入 print mid("N1234",2,1) 請問會顯示(1)2 (2)3 (3)N (4)1
( )6. MsgBox的回傳值型別是(1)string (2)single (3)date (4)integer
( )7. 在Excel VBA的即時視窗輸入 print instr("1+2=3","=") 請問會顯示(1)4 (2)1 (3)2 (4)3
( )8. 底下程式執行時會在即時視窗顯示什麼
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
( )9. 底下程式碼執行結果會在執行視窗出現
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)3,13 (2)4,10 (3)3,10 (4)10,10
( )10. 在Excel VBA中要顯示一段文字hello那一段語法是對的(1)msgbox "hello" (2)say "hello" (3)say hello (4)msgbox hello
( )11. 在Excel VBA的中斷模式時,按那一個按鈕可以逐一行執行(1)F5 (2)shift+F8 (3)Ctrl+Shift+F9 (4)F8
( )12. 底下程式執行時會在即時視窗顯示什麼
Sub test5()
    Dim std_no As Variant
    no = Split(",國文,英文,數學,理化", ",")
    Debug.Print no(3)   '顯示陣列索引為3的資料
End Sub(1)數學 (2)理化 (3)國文 (4)英文
( )13. 圖中的數字1代表(1)worksheet (2)cell (3)row(列) (4)column(行)
( )14. 在Excel VBA中程式碼註解是用什麼字元(1)冒號 (2)分號 (3)單引號 (4)雙斜線
( )15. 為了使亂數每次產生的都不一樣,可以在產生亂數前加入那一個指令(1)dim (2)rand (3)randomize (4)int
( )16. 在Excel VBA的即時視窗輸入 print len("中文字abc")請問會顯示(1)0 (2)6 (3)9 (4)3
( )17. 請問此圖那一個的真值表(1)and (2)not (3)xor (4)or
( )18. 底下程式碼執行結果會在即時視窗出現
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,10 (2)3,7 (3)4,11 (4)3,8
( )19. 底下程式執行時會在即時視窗顯示什麼
Sub test2()
    Dim no As Variant
    no = Array(1, 2, 3, 4, 5)
    Debug.Print no(5)   '顯示陣列索引為5的資料
End Sub(1)出現陣列索引超出範圍 (2)3 (3)4 (4)1
( )20. 圖中的數字2代表(1)workbook (2)worksheet (3)range (4)cell
( )21. 請問此圖程式執行結果(1)在變數i=5時會中斷程式 (2)在變數i<5時會中斷程式 (3)在變數i>5時會中斷程式 (4)在變數i不等於5時會中斷程式
( )22. 在ExcelVBA中要將3顯示在即時視窗要如何使用(1)print 3 (2)debug.print 3 (3)echo 3 (4)debug.echo 3
( )23. 程式碼如下
LRandomNumber = Int ((300 - 200 + 1) * Rnd + 200),請問LRandomNumber的範圍為(1)201<=LRandomNumber<=301 (2)200
( )24. 工作表如圖,若執行底下程式會顯示什麼?
Sub test8()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(1, i + 1).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub(1)3 (2)5 (3)6 (4)4
( )25. 在Excel中活頁簿的英文名稱為(1)Application (2)workbook (3)worksheet (4)excel

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

詳解: