top of page
Excel VBA for Beginners
How to create a message box with VBA?
Using Virtual Basic application (VBA) will show you a whole new Excel efficiency.
However, it is important that you start with a good foundation!
In this first video of the series for VBA beginners, we show you how to make a message box appear by pressing a button, and what to pay attention to when saving an Excel file with VBA code present.
Download the work file HERE .
Video index :
00:00 Introduction
0:30 How can the developers display menu?
1:40 Visual basic editor open
1:47 Create a new module
1:51 What is option explicit?
2:20 Name your Macro (start and end of the macro)
2:36 Create text for message box(Message box).
3:28 How to insert a button?
3:56 How to assign the macro to your button?
4:25 Customize text on a button
4:43 Test Message Box
5:21 How to save an Excel file with macro(s)?
Change a cell value in Excel with VBA
In the previous video you saw how to make a message box appear using VBA.
In this second video, I'm going to tell you how to use VBA to change a cell value by pressing a button.
Download the work file HERE
​
We are also going to use name definition.
Not familiar with this technique yet?
Be sure to take a look at this video link .
Video index:
00:00 Introduction
00:17 Enable macros
01:25 Create start value
01:33 Define a name
02:35 Create new module
02:41 Macro cell value up
03:02 Caution with a macro name
03:33 Working with Range
04:07 Create value selection
05:00 Attention at Same macro name
05:57 Insert buttons
06:17 Assign macro to a button
07:08 Rename on a button
07:43 Use shape or object
09:15 Adjust shape size
09:35 Assign macro to object button
10:00 Test Macro
Excel cell position change with VBA.
In the previous videos we already discussed how to create a message box, as well as how to adjust a value with VBA.
In this video we are going to change position using VBA, so that we can move a selection by means of buttons or another shape.
Download the work file here
We're going to use the shift function here that we also discussed in another video.
But in VBA we are going to use the English name here and this is offset.
If you don't know how to use the shift function yet, be sure to watch the video below HERE
Video index:
00:00 Introduction
00:30 Insert a new module
00:45 Create selection up
02:09 Create a Shape(object) and assign macro
03:20 Create selection(s) down, left, right
04:34 Others Create shapes and assign macros
06:41 How to return to start position
​
How to make a for.....next loop with VBA?
In this video we are going to talk about loops, mainly about for .... Next loop.
This technique is going to make operations even more efficient, and this is of course the intention with VBA.
We will also see for the first time how we work with Dim or naming a certain name with the corresponding function name, to store it in working memory.
​
Download work file HERE
There are different kinds of loops, but the for... Next is little brother of all the others.
However, this technique is a very powerful way to determine the start and end of a loop.
Video index :
00:00 Introduction
00:42 starts a new module
01:13 Create a variable
02:04 Determining a value on the loop
02:49 Valuation of the selection
03:23 Create position change
04:07 Test the loop with F8
05:58 Run the loop with play
06:11 Add a button
06:38 Final decision
​
Did you find this video series interesting?
Would you like to make a small donation?
Thanks in advance.
How to make a for.....next loop with adjustable value?
In the previous video we already saw how to make a for...next loop.
But here we always had to indicate in VBA what the start and end value was. In this video we will let the user determine in the Excel worksheet, what the start and end value of the for ...next loop will be.
Download work file HERE
Video index :
00:00 Introduction
00:33 Start and end in a cell
01:47 Variable determination
02:30 Determine range value
04:20 set loop value
04:47 For Next loop testing
06:31 comments&points of attention on layout
Did you find this video series interesting?
Would you like to make a small donation?
Thanks in advance.
bottom of page