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

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

( )1. 工作表如圖,若執行底下程式會顯示什麼?
Sub test10()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(6, i).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub(1)1 (2)2 (3)3 (4)4
( )2. 下列那一個Excel VBA語法是正確的(1)cells(1,1)=123 (2)excel.range("a1").text=123 (3)range(a1).value=123 (4)cells("a1").value=123
( )3. 請問此圖程式執行結果(1)在變數i<5時會中斷程式 (2)在變數i>5時會中斷程式 (3)在變數i不等於5時會中斷程式 (4)在變數i=5時會中斷程式
( )4. 在Excel VBA中物件方法的圖示為(1) (2) (3) (4)
( )5. 在Excel VBA中變數的宣告要使用那一個指令(1)dim (2)let (3)print (4)set
( )6. 使用debug.print rnd(1)不可能產生那一個數字(1)0 (2)0.99 (3)0.5 (4)1
( )7. 工作表如圖,若執行底下程式會顯示什麼?
Sub test9()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(1, i).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub(1)5 (2)6 (3)4 (4)3
( )8. 程式碼如下
For i= 1 to 10 
      cells(i,1).value=1
Next i
此程式的執行結果?(1)在儲存格A1:J1填入1到1 (2)在儲存格A1:A10填入1到10 (3)在儲存格A1:A10都顯示1 (4)在儲存格A1:J1填入1到10
( )9. inputbox的回傳值型別是(1)string (2)single (3)date (4)integer
( )10. 在Excel VBA的即時視窗輸入 print mid("N1234",2,1) 請問會顯示(1)2 (2)3 (3)N (4)1
( )11. 在Excel VBA的即時視窗輸入 print 1+2+3 請問會顯示(1)123 (2)1+2+3 (3)6 (4)0
( )12. 底下程式執行時會在即時視窗顯示什麼
Sub test4()
    Dim std_no As Variant
    no = Split("國文,英文,數學,理化", ",")
    Debug.Print no(3)   '顯示陣列索引為3的資料
End Sub(1)國文 (2)英文 (3)數學 (4)理化
( )13. 在Excel VBA中不等於的符號是(1)<> (2)>=< (3)== (4)!=
( )14. 在Excel VBA的即時視窗輸入 print right("N1234",1) 請問會顯示(1)4 (2)1 (3)2 (4)N
( )15. 在Excel VBA中大於等於的符號是(1)<> (2)>= (3)=> (4)<=
( )16. 程式碼如下
For i= 1 to 10 
      cells(1,i).value=i
Next i
此程式的執行結果?(1)在儲存格A1:A10填入1到10 (2)在儲存格A1:A10都顯示1 (3)在儲存格A1:J1填入1到10 (4)在儲存格A1:J1填入1到1
( )17. 底下程式碼執行結果會在即時視窗出現
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)0,5 (2)5,0 (3)5,1 (4)5,-1
( )18. 在Excel VBA要強制宣告變數才可以使用,要在程式的最上方加上(1)Explicit (2)dim (3)Option Explicit (4)Option
( )19. 工作表如圖,若執行底下程式會顯示什麼?
Sub test2()
    Dim i As Integer
    
    i = 1
    
    Do While Cells(i + 1, 1).Value <> ""
       i = i + 1
    Loop
    
    MsgBox i

End Sub(1)18 (2)15 (3)16 (4)17
( )20. 在Excel VBA的即時視窗輸入 print lcase("How are you")請問會顯示(1)How are you (2)how are you (3)How Are You (4)HOW ARE YOU
( )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. 在Excel VBA的即時視窗輸入 print len(trim(" 1+2=3 ")) 請問會顯示(1)0 (2)4 (3)5 (4)6
( )23. 圖中的數字2代表(1)workbook (2)worksheet (3)range (4)cell
( )24. 工作表如圖,若執行底下程式會顯示什麼?
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
( )25. 插入按鈕是那個圖示(1) (2) (3) (4)

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

詳解: