9,99 €
This document is intended to introduce users to programming in general and to programming in Visual Basic in particular. The VB is simple and can be used on existing csv files or data entered directly into Visual Studio, quickly processing a large amount of data. For the moment the only tool we need is Visual Studio and the csv files. Obviously I can't go into the intricacies of the databases that I will definitely include in a future book.
The book may not contain everything you should know about programming in VB, but it does point the finger at the key points to create some programs which are explained in detail in the various chapters. The content is divided into two parts one which explains programming in general and the second which explains programming in VB with concrete examples of programs.
To see the programs inserted in this document in Excel's VBA created, I refer to my other eBook “EASY PROGRAMMING WITH VISUAL BASIC FOR APPLICATIONS (VBA)”.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
EASY PROGRAMMING WITH VISUAL BASIC (VB)
Introduction
Summary
PART I.: The basics of programming
Chapter 1: Understanding and solving problems
Chapter 2: The logic of programming
PART II: Programming in VB
Chapter 3: The VB
Chapter 4: Program in VB
Chapter 5: Examples of programming in VB
Epilogue / Conclusion
FROM THE FLOW CHART TO THE PROGRAM IN VISUAL STUDIO VIA VB
Of
OLGA MARIA STEFANIA CUCARO
© Copyright 2021 by Olga Maria Stefania Cucaro - All rights reserved.
You may not reproduce, duplicate or send any part of this document electronically or in print. Copying of this document is strictly prohibited. All the programs included in this book are also copyrighted by the author / creator of the work.
Dedicated to:
To my mother who has always believed in me and to all the computer professors I have met in my life
This work was born from the necessity encountered by the author to solve various problems repeated over time, concerning the data entered in Excel sheets in the shortest possible time. The author, being a programmer and expert in Pascal, Cobol and Javascript, searched for the most suitable solution and found it in the Excel VBA and in the Visual Studio VB. This document is intended to introduce users to programming in general and to programming in Visual Basic in particular. The VB is simple and can be used on existing csv files or data entered directly into Visual Studio, quickly processing a large amount of data. For the moment the only tool we need is Visual Studio and the csv files. Obviously I can't go into the intricacies of the databases that I will definitely include in a future book.
The book may not contain everything you should know about programming in VB, but it does point the finger at the key points to create some programs which are explained in detail in the various chapters. The content is divided into two parts one which explains programming in general and the second which explains programming in VB with concrete examples of programs.
To see the programs inserted in this document in Excel's VBA created, I refer to my other eBook “EASY PROGRAMMING WITH VISUAL BASIC FOR APPLICATIONS (VBA)”.
Introduction 1
Summary 2
PART I.: The basics of programming 4
Chapter 1: Understanding and solving problems 5
Understanding a problem and breaking it down into simple operations 5
Identify variables and constants 6
What does pseudo-code mean 6
Chapter 2: The logic of programming 7
The variables 7
The conditions 8
The cycles 9
Transform a sequence of operations into instructions 10
The flow chart 11
12
PART II: Programming in VB 14
Chapter 3: The VB 15
What is VB and how to use it 15
How to access VB 15
Chapter 4: Program in VB 20
The variables in VB 20
Chapter 5: Examples of programming in VB 22
The sum of two numbers 22
The sum of n numbers 24
The average of n numbers 26
Count values 30
Sum of the values in a given range 33
Sum of values that meet certain conditions 38
Use of multiple sheets to solve complex work problems 42
75
Epilogue / Conclusion 76
The first step to take before programming is to understand the problem to be solved with the program we are going to create.
Just like in math it is best to think carefully before starting to solve the problem. For example, let's assume you work in a Call Center and have all the probable customers to contact periodically in an Excel sheet and all the customers contacted in the single days of the twelve months of the year in another sheet and we know that the customer must be contacted maximum 3 times a month, this is a problem that we can solve with the VB. In particular, to solve the problem we have to look for the names of the first sheet in the second sheet and count how many times it is repeated for each month, DATA that we will insert in the first sheet. Subsequently we will carry out a check and if the value for each month is greater than 3 we could decide to color the number in red to highlight the problem.
Another example could be to calculate the hours worked by each employee and the relative remuneration, obviously having in one sheet the name of the employee and the hourly remuneration and in another sheet the hours worked in each single day of the month. In this case we will search for the name entered in the first sheet in the second sheet and we will add the hours worked by each individual employee and multiply them by the hourly wages.
We will solve these problems at the end of this book after having better understood the basics of programming and VB, but the logic of the solution must be clear before tackling the programming step.
Let's start with the simplest example that is the sum of three numbers. What do we do automatically to add three numbers?
we read the three numbers
Let's add the three numbers
We write the result