VBA Flashcards
(140 cards)
What is a programming language?
- A system of statements used to control a computer.
What is required of a programming language for it to be able to be manipulated a machine?
It needs to:
- Accept input: from external data or from the user;
- Store data;
- Manipulate data i.e. transform it;
- Produce output.
Visualise the Object-Oriented Programming paradigm.
List the top 3 levels (from the top down) of the Excel Object Model.
- Application Object;
- Workbook Object;
- Worksheet Object
Everything in the Excel program (down to individual cells) is an object (within another object and/or containing other objects).
What are some properties, methods and events of the Application Object?
- Properties: Version; Caption; Default file path; Workbook collection…
- Methods: Calculate; CheckSpelling; Quit…
- Events: SheetCalculate; NewWorkbook; WorkbookBeforeClose…
What are some properties, methods and events of the Workbook Object?
- Properties: Name; Sheets (collection); Saved…
- Methods: Close; PrintOut; Save…
- Events: BeforeClose; NewSheet; BeforeSave…
What are some properties, methods and events of the Worksheet Object?
- Properties: Name; UsedRange; Visible…
- Methods: Activate; Copy; Delete…
- Events: Activate; Deactivate; Change…
On which tab can the “Macros” dialogue box be found?
View
What’s the keyboard shortcut that changes between the VBA editor and the Excel workbook?
Alt+F11
What’s the keyboard shortcut that runs the code after you mouse-click inside a Sub?
F5
What’s the keyboard shortcut that opens the Project Explorer pane?
Ctrl+R
What’s the keyboard shortcut that opens the Excel Object Browser?
F2
In the VBA Object Browser, what image appears besides a property?
In the VBA Object Browser, what image appears beside an action?
In the VBA Object Browser, what image appears beside an event?
What’s best practice with regards to the number of workbooks open while using VBA?
One workbook open at a time.
Where can the VBA Project Properties dialogue box be found? What can you do with it?
In the Tools tab of the VBA editor.
Here you can change the name of the project and add a discription to it.
You can also set a password protection of your code.
Where can you protect visibility of your VBA code from others?
Tools > VBAProject - Project Properties > Protection
Make sure you don’t forget your password.
What’s the keyboard shotcut to close an excel file?
Ctrl+W
What’s the keyboard shotcut to open an excel file?
Ctrl+O
What’s the keyboard shotcut to save an excel file?
Ctrl+S
What are the three types of module in VBA?
Object modue;
Standard module;
and
Class module;
How can the code of a module be exported?
Right-click a module, select “export file” and then save as either a .bas (basic file) or a .txt (simple text file).
What are the two main types of procedure you can create in VBA?
Sub routines;
and
Functions.