Posts by techtonic

    Hello everyone,

    I have an important exam coming up and desperately need the answers to these questions. Please help. I would be highly grateful for the same.

    Please select the right option -


    Q1. What object is needed to put a userform module in a VBA project?

    1. associated standard code module
    2. UserForm
    3. associated class module
    4. userForm class


    Q2. What is the output of the following?


    Code
    Sub UseSum()
    Dim TestArray() As Integer, Total As Integer
    ReDim TestArray(1)
    TestArray(1) = 6
    ReDim TestArray(2)
    TestArray(2) = 3
    Total = WorksheetFunction.Sum(TestArray)
    End Sub


    1. 3
    2. 0
    3. 9
    4. 6


    Q3. The Driver subroutine is declared by Sub Driver (Y). Which statement results in a compile error?


    1. Driver x
    2. call Driver(x)
    3. call Driver x
    4. Driver (X)


    Q4. You have several variables to display on a user form, and there are too many variables to display at once. Which control best enables the user to see all the variables?

    1. Frame
    2. multipage
    3. TabStrip
    4. ListBox


    Q5. Below is a function named SquareIt. Which version of the subroutine named Area results in a compile error?

    Code
    Function SquareIt(ByRef Basis As Integer) As Long
    SquareIt = Basis ^ 2
    End Function

    1. sub Area()

    Code
    Dim Result As Long, Side As Integer
    Side = 5
    Result = Squarelt(Side)
    End Sub

    2. Sub Area()

    Code
    Dim Result As Long, Side
    Side = 5
    Result = SquareIt(Cint(Side))
    End Sub


    Q6. EmailAddress() is an array. It is declared by Dim EmailAddress(10) As String, and option Base 1 is in effect. How many rows and columns are in EmailAddress()?

    1. 10 rows and 10 columns
    2. 10 rows and 1 column
    3. 10 rows and 0 columns
    4. 1 row and 10 columns


    Thank you for your time. Highly appreciate the help :)