Excel Visual Basic Variables, Part 1: Variable Types
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.
This is from Microsoft Excel 2000 Visual Basic Help, with changes and additions. A Function procedure is a series of Visual Basic statements enclosed by the Function and End Function statements. A Function procedure is like a Sub procedure, but a function can also return a value. A Function procedure can take arguments, such as…
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…
In our previous post, we looked at connecting VBA code to command buttons on the Worksheet, the Quick Access Toolbar and the Ribbon. What about the other Form Controls: The Combo Box, List Box, or Check Box? How about Option Buttons, the Scroll Bar, the Spin button, the Label, etc.? That’s coming up in this…
The Excel Visual Basic Editor can be set to appear in a variety of ways. In the appearance shown below (the default) the majority of windows appear docked at one edge of the screen. Code windows can be tiled together on the screen, or one can be maximized. The main features of the screen are…
You can use Excel Visual Basic to read and write text files (Sequential and Random file access). But we will not touch on text files in this post. Rather, we will look at how to save and open Excel files using Excel code, plus a few valuable functions: The bigger examples below are in the…
The easiest way to create a macro is: The instructions below are for Excel. Word is similar, but has its own quirks (and no “Absolute or Relative”). If you want to look at programming basics first, see this previous post. 1. Recording a Macro Absolute or Relative What does that mean? When you record Absolute,…