John Walkenbach

Articles & Books From John Walkenbach

Article / Updated 01-18-2019
In some cases, you may want the user to select an Excel VBA range while a dialog box is displayed. An example of this type of Excel VBA range selection occurs in the Create Table dialog box, which is displayed when you choose Home → Insert → Tables → Table. The Create Table dialog box has a range selector control that contains Excel's guess regarding the range to be converted — but you can use this control to change the range by selecting cells in the worksheet.
Article / Updated 01-18-2019
No one is going to become a VBA expert in one day. Excel VBA is a journey of time and practice. The good news is that plenty of resources are out there that can help you on your path to Excel VBA prowess. Here, you discover ten of the most useful places to turn to for Excel VBA help when you need an extra push in the right direction.
Article / Updated 01-18-2019
Like humans, pets, and hurricanes, every Excel VBA Sub and Function procedure must have a name. Although it’s perfectly acceptable to name your dog Hairball Harris, it’s usually not a good idea to use such a freewheeling attitude when naming Excl VBA procedures. When naming Excel VBA procedures, you must follow a few rules: You can use letters, numbers, and some punctuation characters, but the first character must be a letter.
Article / Updated 01-17-2019
Excel VBA provides numerous built-in functions. Some of these Excel VBA functions take arguments, and some do not. Excel VBA function examples Here, you find a few examples of using VBA functions in code. In many of these examples, the MsgBox function displays a value in a message box. Yes, MsgBox is a VBA function — a rather unusual one, but a function nonetheless.
Article / Updated 01-17-2019
A Range object has dozens of properties. You can write VBA programs nonstop for the next 12 months and never use them all. Here, you get a brief overview of some of the most commonly used Excel VBA Range properties. For complete details, consult the Help system in the VBE. (Check out these additional resources for help with Excel VBA.
Article / Updated 01-17-2019
If you are trying to get a good grasp on Excel VBA, you probably could benefit from a few examples to develop that visual basic prowess. Here, you find a few Excel VBA examples so that you can get the hang of this event-handling business. Excel VBA example: The Open event for a workbook One of the most commonly used Excel VBA events is the Workbook Open event.
Article / Updated 01-16-2019
This Excel add-in example discusses the basic steps involved in creating a useful add-in which you can use to package your VBA procedures. This Excel VBA example is based on the Change Case text conversion utility. Setting up the Excel workbook The Excel workbook consists of one blank worksheet, a VBA module, and a UserForm.
Article / Updated 01-16-2019
As you become proficient with Excel VBA, you spend lots of time working in Code windows. Macros that you record are stored in a module, and you can type Excel VBA code directly in a VBA module. Minimizing and maximizing VBA code windows If you have several projects open, the VBE may have lots of Code windows at any given time.
Article / Updated 09-11-2018
Want to navigate your visual basic projects without reaching for the mouse? Try using these keyboard shortcuts to move between projects and modules: What to Press What It Does Up arrow Moves up the project list one item at a time. Down arrow Moves down the project list one item at a time. Home Moves to the first file in the project list.
Article / Updated 09-11-2018
At some point, you may find yourself working with many macros at one time. It can be tedious trying to navigate between and within macro procedures by clicking around with the mouse. These keyboard shortcuts allow you to quickly jump to a target procedure, navigate modules, and even find the starting point for variables.