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.
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,…
A major reason to program Excel Macros is to get the spreadsheet to do something. This post is a goldmine of useful Excel Visual Basic code for talking to Excel. You can get use the routines stand-alone. Alternatively, you can save retyping or copy-pasting: Get the file Macros.xlsm free of charge from us. 1. Table…
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…
We had an earlier post, How to Use Objects, Collections, Properties, Events and Methods in Excel Visual Basic. There, we introduced the idea of Objects and Collections. We listed the most useful Objects, and Collections of Objects. Below we have more extensive diagrams, specifically for the Excel Object Model. It helps to understand the hierarchy:…
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…
This is an excerpt from Microsoft Excel Visual Basic Help, with extra Notes. The syntax in a Visual Basic Help topic for a method, statement, or function shows all the elements needed to use the method, statement, or function. The examples in this topic explain how to interpret the most common syntax elements. 1. Activate…