INTRODUCTION TO VISUAL BASIC FOR APPLICATIONS (VBA)

This tutorial introduces you to Visual Basic for Applications (VBA), a version of Visual Basics which comes with Microsoft Excel. You will learn how to type in and run a simple program in the form of a Function block.
Read more

An Excel/Visual Basic for Applications (VBA) Programming Primer

An Excel/Visual Basic for Applications (VBA) Programming PrimerIn the past, even mildly complicated engineering calculations have not mixed well with spreadsheets because of the very strong tendency to wind up with nearly-impossible-to-debug “spaghetti” code. While most students seem to enjoy using spreadsheets, instructors recognize that other than by finding the “correct” answer printed somewhere, it is next to impossible to grade assignments or to help the occasional student debug them. However, by using Visual Basic for Applications (VBA) in conjunction with the Excel spreadsheet, the user has the convenience of a spreadsheet for input/output and graphics, i.e., to function as a graphical user interface (GUI), while using well-structured, readable, line-oriented code for the more complicated calculations. This appendix will review a few general aspects of spreadsheets, while providing a brief introduction to the use of functions and subroutines written in VBA. Many books about Excel do not address VBA at all, and if they do, the coverage is limited to a few pages [1-3]. However, several recent books, including Walkenbach [4], Orvis [5] and Halberg, et al. [6], Chapra [7], Albright [8] and Bullen, et al. [9] do cover VBA extensively. References 7 - 9 books are almost entirely devoted to VBA, with the Chapra book aimed at beginning engineering students, including those learning to program for the first time.
Read more