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.
At this point, you might be wondering, “What if I get stuck?” Fear not, help is at hand! Microsoft offers extensive online documentation of the VB language. To be fair and warn you, it’s often not that useful. You might find more assistance if you Google for your topic. There is a lot of programming…
In an earlier post, we looked at connecting VBA code to command buttons on the Worksheet, the Quick Access Toolbar and the Ribbon. What about the other ActiveX Controls: The Combo Box, List Box, or Check Box? How about Option Buttons, the Scroll Bar, Spin button, Toggle button, etc.? That’s coming up in this post….
While you can pick these Shortcut Keys up from the menus in the Excel Visual Basic Editor, it is useful to have them all in one place. F1 Help on the highlighted itemF2 Object BrowserShift+F2 View Definition (Go to highlighted Sub or Function)F3 Repeat last FindF4 Display Properties WindowF5 Run / Continue RunF8 Single Step…
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 an earlier post, we recorded two Excel macros in Visual Basic, and ran them. Then, in the next post, we viewed the code in the Excel Visual Basic Editor. Code you have recorded will usually run. However, you may want to change it for all sorts of reasons. To tidy it up, make it…