|
Almost; VBA = Visual Basic for Applications, i.e., it is the macro language for all the MS Office apps. That said it has many of the features/objects of real VB, the main difference is that you can't build standalone apps with it - the VBA modules have to be at least associated with, if not embedded in, an Office app file, e.g., an Excel worksheet. But is very powerful once you move beyond thinking about just macros.
We use it to teach fundamentals of OO programming. You don't need a specific development environment or the APIs, etc, etc - you just need Excel with macros and the VBA editor enabled. What is cool is that on the code understanding side you can record a macro, view the generated VBA code and then edit it to suit. For example, we get students to record their setting up of a 3 column table of data, sorting it, and generating a chart from it. They then examine the code, replace the keyboard entered constant values with variables, use Inputbox object to assign values to those variables, and so on,. They end up with a generalised macro which they use to enter values, sort the data, set the chart parameters, etc, without the user entering a value into a cell and using the menu. A VBA macro can also be set to be invoked as soon as the file is opened so the user is presented with input, dialog and message boxes and never see the worksheet.
Aubrey
_________________ The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn, and relearn. Alvin Toffler, "Future Shock" 1970
|