VBA session 3 Paul Rubinov. My job: diverse audience so Bore you for 15 minutes. Confuse you for the other 15 min. Feel free to contact me email@example.com Disclaimer IANAP (I am not a programmer) We are not covering language syntax – but your book does. VBA session 3: Introduction.
Record lots of macros.
Give yourself a project.
If you master these skills, you are 90% done
…but do it on your own time.
For now, open Example1.xls
but notice this line:
This is using “named parameters”
so no big deal- this is just a function call
*If you get an error message when you try this, you do not have help installed for VBA. It is not installed by default!
to find, press CTRL-F in VBA, make sure ”Current Project” radio button is pressed and search for the highlighted word
Ex1: calling windows DLLs
Public Declare Function timeGetTime Lib "winmm.dll" () As Long
Declare Sub Sleep Lib "Kernel32.DLL" (ByVal dwMillisecconds As Long)
Ex2: If you have a driver for Visual Basic, chances are, it will work in VBA
Ex3: Example of Bob A’s utility routines
Ex4: Example of Bob A’s routines for performance
Ex5: You can see an example of the use of STATIC variables in module
This module is used in the skeleton version of the stepper, so you should be able to debug it, see how it works.
Ex6: You can create your own objects by defining a new “Class”
This is also an example of using an external “object” (in this case the “Scripting” class)
And also an example of file access using the FileSystem object contained in the scripting library
Rapid Application Development
or in English
Easy tool for Quick and Dirty software jobs