Description of date and time functions. The VBA date functions as per the name indicate are used to manipulate values related to dates and time. On their basis, we can receive any parameter from the given date, such as day, month, year, etc. We can also subtract two dates from each other. If we want to enter […]

VBA character functions in Excel The Excel VBA offers us a number of useful character functions. We can not compare them to the number of functions in an Excel spreadsheet, and most importantly, these are not the same functions. The use of the sheet functions in our VBA code will be described in a separate chapter . Character functions like mathematical functions can be […]

Description of mathematical functions in Excel VBA Below are the names and descriptions of all standard math functions in Excel VBA. As you can see functions such as RND () do not require arguments. Functions such as ROUND () require 2 arguments – the value and the number of decimal places to which we round our value. Numbers with decimal places in […]

Introduction to functions in Excel VBA You have already come to the chapter about functions – Congratulations, keep it up !!! In VBA we have a number of useful functions. It is through them that our programs will work in the right way. With their help, we will perform mathematical activities, manipulate text data and dates. We reference the […]

Types of operators in Excel VBA In our scripts we will use both arithmetic expressions and use logical expressions. For this purpose, we will be able to use operators in Excel VBA, we can divide them into 3 groups: arithmetic logic comparison. VBA operators: arithmetic Arithmetic operators serve as the name suggests the implementation of actions math. When […]

Introduction to data types Why is it so important to assign a variable to the correct data type? Our program and its variables use the resources of our computer. If we want to ensure that our program works quickly and efficiently, we choose the types of data that we really want to use. For example, we do not write dates […]

What are constant values in VBA? In the previous chapter of the training you learned what are the VBA variables appearing in our VBA code. The difference between variables and constants of VBA is such that the values assigned to constants will not change during the launch of our program. If we want our code to be fully compliant […]

Introduction to VBA variables. In VBA, as in other programming languages, we work with variables. The VBA language does not require declaring variables. You can, for example enter a variable name that will be interpreted as a variable, and then execute any instructions on it. I put an example listed below.

1 2 3 4 |
'OfficeInside.Org Sub VarDef1() MsgBox (MyVar * 5) End Sub |

The result of the example operation is […]

Formatting cells and fonts in VBA – introduction Cells as well as other elements of the Excel spreadsheet can be formatted from the VBA code level. The formatting itself can be done in 2 ways. The first way is to set each format using a separate code block. You can also use the With clause to format cells and fonts, which […]

InputBox window – entering data into VBA It’s great, that you have already reached this part of VBA tutorial. After the VBA MsgBox window you will learn how to work with window for entering data into our VB code. Like the MsgBox window, this window has many additional parameters. Let’s try to create a simple […]

## Recent Comments