Code Manipulation Flashcards

1
Q

What is breakpoint in VBA

A

Alt+F11 directly opens the editor
Press F5 to run the programme or code
The breakpointspecifies the line in your code where VBA should pause the execution of the macro operation when debugging the code. Specifying the breakpoint helps prevent VBA from running into a loop of IF statement. The shortcut key for adding a breakpoint is F9.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is debug in VBA

A

Summary. VBA debugging isa process of locating and fixing errors, bugs, and other unintended features in the VBA code. VBA comes with various built-in debugging tools that can be used to find errors and bugs, thereby eliminating the need to recompile the code.

Alt+F8 runs the macro to run the macro in every sheet go to macro and run the code it will apply in all sheets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is syntax in VBA

A

The syntax in a Visual Basic Help topic for a method, function, or statementshows all the elements necessary to use the method, function, or statement correctly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is variable in VBA

A

Variable is a named memory location used to hold a value that can be changed during the script execution. Following are the basic rules for naming a variable. You must use a letter as the first character. You can’t use a space, period (.), exclamation mark (!), or the characters @, &, $, # in the name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Key words in VBA code

A

AsAs keyword is used with Dim to specify the data type of a variable or argument.ByRefByRef keyword is used to pass variables or arguments into procedures and functions.ByValByVal keyword is used to pass variables or arguments into procedures and funct

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Sub function in VBA

A

AsAs keyword is used with Dim to specify the data type of a variable or argument.ByRefByRef keyword is used to pass variables or arguments into procedures and functions.ByValByVal keyword is used to pass variables or arguments into procedures and funct

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Ending key words

A

End with
End if
End function
End sub

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Keys words in VBD code

A

Call
With
What
Replace

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Objects and VBA intellitext

A

An objectrepresents an element of an application, such as a worksheet, a cell, a chart, a form, or a report. In Visual Basic code, you must identify an object before you can apply one of the object’s methods or change the value of one of its properties.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Intellitext

A

Intellitext helper box will pop up whenever u but . Dot after a know object.
Intellisense is basicallyauto-completionwhen you are typing. This displays a short description of member, function, arguments etc next to the cursor and is a convenient way to access functions, parameters, enumerations etc. Using intellisense speeds up development by reducing keyboard input.
Icons indicates whether it’s method or a property ,methods are little green moving box. Properties are little box little hand pointing at it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How many types of variable

A

2 types simple type and objects
Simple type are single valued items like numerical value,

Variable Data Types

Integer: Used to store number values that won’t take on decimal form.

Single: Used to store number values that may take on decimal form. …

Double: A longer form of the single variable. …

Date: Stores date values.

String: Stores text. …

Boolean: Used to store binary results (True/False, 1/0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is object variable

A

The object variablecontains only the memory address of the object. Using Set changes the address in the object variable. If an object is no longer referenced then VBA will automatically delete it. Setting an object to Nothing is not necessary in most cas

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

When to use the call code

A

When you are passing arguments into a subroutine, you need to pass them as a comma delimited list. The Call keyword can also be used here. Passing in parameters when using the Call keyword, does require the parameters to be enclosed in parenthe

How well did you know this?
1
Not at all
2
3
4
5
Perfectly