Understanding VBA Code: What if we Don't Declare Variables?

preview_player
Показать описание
*********************************
*********************************

Understanding VBA Code: What if we Don't Declare Variables?

Video description
----------------------------
The goal of my Excel VBA tutorials are to take you from a beginner level to a confident Excel VBA developer and programmer as quickly as possible. The best way to do this is to help you UNDERSTAND Excel VBA code and how to build robust Excel spreadsheets.

This free beginner level Excel VBA tutorial is the first in a series which deal with variables in VBA and we use MS Excel to demonstrate the concepts.

We start with a VBA function for calculating the forward price of a given asset and then modify our VBA code in the function so the internal variables are no longer declared. The function is not important but what is important is how VBA handles us not declaring the variables.

We open up the locals window within the Visual Basic Editor and step through the code while executing so we can take a look at the variables that are created. We find that VBA creates new variables of type Variant each time it encounters what it thinks is a new variable within the VBA code.

The video uses Excel 2016 but the same steps are used for Excel 2010 and Excel 2013. The exact same principles also apply to MS Access 2010, 2013 and 2016.

If you enjoyed this short tutorial then please add a comment, start a discussion, "Like", "Favourite" or "Share" the tutorial and subscribe to my channel.

Channel Links and Playlists
----------------------------

Other Useful Links
----------------------------
You can often find deals on my current and upcoming Udemy courses here

Thanks for watching!

Paul.
Рекомендации по теме
join shbcf.ru