| Posted at 08:15 AM on December 23, 2008 |
Next we will learn that programming involves typing. I bet that gave you a start. Yes, sorry but you have to do some real work now. Here is how we write some code.
In the editor, you opened it in lesson 2, double click (that is two left hand mouse button clicks – click click) where it says ThisWorkbook

Once you’ve double clicked your left mouse button, you should see this screen

What you’ve done, is create an editable area to write your VBA code in (the bug nest). Were now going to type in some code and run it. Imagine you have an aunty Mary and she wears bloomers. We want our program to pop up a box and tell everyone about Aunt Mary and her bloomers. So we’d type the following

To get this program to run, we press the F5 key (function key) on our keyboard. This will run our first program and pop up a message like this

Oh what joy, didn’t take you long to write your first program. Your flying along now.
Categories: VBA Tutorials (mixed nuts)