VBA or Visual Basic for Applications is the programming language object-oriented used in Excel to create automated tasks . In theory it is a version of Visual Basic made for use with Microsoft Office applications. If you want to use it is essential to know the use of functions in VBA properties and methods.
To give a professional look to the Office applications is possible thanks to this wonderful tool that is installed by default. Allows you to program objects, give an intuitive look and create automated tasks . Unlike Visual Basic, VBA only be used in environments Office applications .
What is OOP?
If you’re not programming related to this term you should look Chinese words. The OOP (OOP) is a programming paradigm that uses objects to interact. File Excel is full of objects that can be set in hierarchies and to perform actions necessary to modify the methods and properties of objects.
Using functions, properties and methods in VBA
Inside the Excel application objects are things that can be manipulated, for example: a book, a sheet and a cell are Excel objects. Only Excel has more than 200 objects that are organized into hierarchies, meaning that an object can contain other objects.
All elements Excel are an object, a book, a chart, a PivotTable, etc. All objects have properties , which are the characteristics that define the object and methods are the actions you can take that object.
In simple terms properties are the characteristics of objects and methods are actions that can be performed . This example applied in real life a mobile can be an object, ownership of mobile would be the color you have and a method would make a call.
All objects have properties or characteristics that describe it. These attributes define how the object looks, size, color, screen location and appearance in general.
VBA to assign a property value should be made following the reference object with a point, the name of the property and then an equal sign (=). The syntax should be as follows:
You may also be interested in:
Objeto.propiedad = attribute
Some properties can also be objects . Apply as if you wanted to change the font type Range object should use the Font property. As sources have different characteristics such as size and shape, apply other properties.
The properties tell the object should look like now methods indicate how to behave . The method is the action you can take the object in Excel. The syntax for implementing a method is as follows:
Some methods allow more complex arguments are parameters for specific actions to be performed by an object
Functions in VBA
The functions execute code programmed into the application to give the final result a value Functions require one or more variables interning for various operations and display a result. & Nbsp.; Excel already has more than 400 functions programmed , some are well known as SUMA MEDIA or used to make simple arithmetic operations.
How to enable macros in Excel 2016
If you do not find options in the Ribbon tool is because they are hidden. To activate and display from now on must click on the Choose File and then Options.
Select the Customize Ribbon . Shows two boxes where the main tools (left) and the main tabs (right) appear. The Scheduler option must be disabled, select it and press the OK button. From this point you Ribbon Programmer available should appear.
You may also be interested in:
A quick way to do this is by right-clicking anywhere Blank ribbon and select the option Customize Toolbar Quick Access and then Customize Ribbon.
I'm sorry this content was not useful for you!
Let me improve this content!
Tell me, how can I improve this content?