This article is part of our VBA Crash Course. Please read the rest of the articles in this series by clicking below links.

- What is VBA & Writing your First VBA Macro in Excel
- Understanding Variables, Conditions & Loops in VBA
- Using Cells, Ranges & Other Objects in your Macros
- Putting it all together – Your First VBA Application using Excel
- My Top 10 Tips for Mastering VBA & Excel Macros
In part 4 of our VBA Crash Course, we are going to create our very first VBA application using what we learned so far.
Our first Application – What is it supposed to do anyway?
Remember the “We Are Nuts” example. We are back to it. This time, we will create a daily sales tracker application that makes your job a breeze. But saying words like breeze when defining your next VBA application is a dangerous thing. So lets list down all the things our little Excel VBA workbook should do.

- The current method of using Inputboxes to capture 24 sale values and any reasons for deviation is tedious. So our application should instead process the values from already entered values and ask for reasons (thru inputbox) only when the sales are too low or too high.
- At the end of processing the sales, we want to see a short summary of how we did for the day. Something like this,

- Once we finish viewing the statistics a snapshot of the daily sales & along with summary statistics should be saved to current folder as PDF for later reference.
Designing our first VBA Application – Key Ingredients:
In this section, let us understand how our application should be designed and what goes in to it.
First, let us look at various things our application need to do, in a schematic. This types of diagrams are called as flow charts.

Key Ingredients of our Daily Sales Tracker Application:
Lets look at each area of our application and understand what VBA technique or statement helps us to do it.
- Process one store sale at a time: This is achieved with the FOR EACH statement [Related: What are VBA loops?]
- Capture reasons for deviation: Lets do InputBox() for this
- Calculate Summaries as we go: Some variables to calculate the summaries as we go. And a few IIF() formulas to help us update the values where needed. (PS: IIF is Inline IF Formula)
- Display Summary Statistics: We will use MessageBox() for this.
- Save a snapshot of the report: This is done by Range.ExportAsFixedFormat() method. [Related: understanding cells, ranges & other VBA objects]
Demo of our Daily Sales Tracker VBA Application
Here is a quick demo of our Daily Sales Tracker Application
Download our Daily Sales Tracker VBA Workbook:
Click here to download the Daily Sales Tracker VBA Workbook. Enable macros, enter some values and play with it.
If you just want to examine code, see this page.
What Next – My top 10 tips for using VBA
In final part of our VBA crash course, Learn my top 10 tips for mastering VBA.
If you have not read, please read the first 3 parts of this series,
- Introduction to Excel VBA – What is it & How to write your first VBA Macro.
- Understanding Variables, Conditions & Loops in VBA
- What are Excel VBA Objects and how to use them?
How do you like this VBA Application? How would you enhance it?
This application is one simple example of what you can do with VBA. Learning how to use Excel & VBA can enable you do several more awesome things at your work & life.
Do you like this application? How would you have designed it? Please share your ideas & tips using comments.
Join Our VBA Classes
We run an online VBA (Macros) Class to make you awesome. This class offers 20+ hours of video content on all aspects of VBA – right from basics to advanced stuff. You can watch the lessons anytime and learn at your own pace. Each lesson offers a download workbook with sample code. If you are interested to learn VBA and become a master in it, please consider joining this course.














