Excel Visual Basic Variables, Part 2: Declaring and Naming Variables, Scope and Lifetime
Subscribe to continue reading
Subscribe to get access to the rest of this post and other subscriber-only content.
Subscribe to get access to the rest of this post and other subscriber-only content.
Before Excel 2003, you could get a complete list of Visual Basic Functions by looking in Visual Basic Help > Contents > Functions. In Excel 2010, entering “Functions” into the Help Search box produces nothing useful. Using a specific category, e.g. “Math Functions”, may be more productive. Please be aware of what references to “Excel…
Here is a function that displays the formula in another cell: FORMULATEXT(reference). The argument, “reference”, is the cell address that contains the formula you want to display. This is most useful for documentation purposes. For example, when you want to print out a spreadsheet with its formulas. If you have spent much time on this…
In Alice in Wonderland by Lewis Carroll, at the trial of the Knave of Hearts, the White Rabbit asks the King how to read the evidence. “Begin at the beginning, the King said, very gravely, and go on till you come to the end: then stop.” It would be easy if all computer programs did…
1. What are Objects and Collections? Visual Basic defines a number of what it calls Objects. Examples of Objects are: In object-orientated terminology, Objects belong to Classes. Collections are groups of Objects. Here are some examples of Collections that Visual Basic defines: 2. The Excel Object Model Excel, too, has objects of its own. When…
1. What are Controls? First, some terminology. If you wanted to run a macro from a worksheet, you could create a button on the worksheet for the user to click. Such a button is a Control. There are many types of controls, which we will use in a later post. Apart from Command Buttons to…
You can record a macro to copy from and paste to the Excel worksheet. Easy enough. But what if you have a value in Microsoft Excel VBA that you want to put on the clipboard for another program? Or you want your code to get text from the clipboard after you copied it there from…