Question: 7 . Left ( ) is a string function in VBA. Option Explicit Dim answer As Integer, subb As Integer Dim Num 1 As Integer,

7. Left() is a string function in VBA.
Option Explicit Dim answer As Integer, subb As Integer Dim Num1 As Integer, Num2 As Integer Private Sub AddValue() Num1=22 Num2=11 Range("B2").Value = Num1+ Num2 answer =100 answer = answer +1 MsgBox (Range("B2").Value) MsgBox ("value of cell b2 using range syntax is " & Range("b2").Value) Cells(5,4).Value = "hello" MsgBox (answer) End Sub
18. Option Explicit means that
a. All variables are to be declared
c. The number of variables cannot exceed 100
b. All variables are case sensitive
d. Constants cannot be used
19. What is the content of cell B2 after the program finishes execution?
a.22
c.33
b.11
d.2
20. In the above code, Cells(5,4).Value refers to the value of Excel cell a. D5 c. C1 b. D4 d. C4
21. What is the value displayed in the last dialog box after the program finishes execution?
a.100
c. HELLo
b. Msg
d.101
Questions 22-30, refer to the following the code
Dim MyString As String Sub Testing() MyString = "I went to School" MsgBox ("Length is " & Len(MyString))' string length MsgBox (UCase(MyString))' to upper case MsgBox (LCase(MyString))' to lower case MsgBox (MyString)' string as is End Sub
22. If you run the above code, how many dialog boxes will be displayed?
a.4
c.3
b.5
d.6
23. The first dialog box will display a. Length is 16 c. I WENT TO SCHOOL b. I went to School d. i went to school
24. The second dialog box will display
a. Length is 16
c. I WENT TO SCHOOL
b. I went to School
d. i went to school
25. The third dialog box will display
a. Length is 16
c. I WENT TO SCHOOL
b. I went to School
d. i went to school
26. The fourth dialog box will display
a. Length is 16
c. I WENT TO SCHOOL
b. I went to School
d. i went to school
27. The function UCase(string) converts a string to
a. Lower case
c. color red
b. Upper case
d. color green
28. The function LCase(string) converts a string to
a. Lower case
c. Integer
b. Upper case
d. Double
29. The variable Mystring is declared of type
a. Double
c. String
b. Integer
d. Currency
30. In the above code, the parts of the code in green color
a. Run at the end
c. Are colored for fun
b. Run in the beginning
d. Do not run because they are comments

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!