top of page
The VBA Help blog
Search
Calling methods and properties by name in VBA with CallByName
Sometimes you don't know until run time which method to call ... the name's sitting in a cell, a file, a registry key or a button's Tag. VBA's CallByName turns that String into a call: getting or setting a property, or calling a method, by name.
Jun 233 min read
Â
Â


Expand / un-expand environment variable strings
Expanding and unexpanding environment strings using the Windows API.
Feb 272 min read
Â
Â


Creating sentences and lists from a series of items
Often, especially when creating text to show to a user in a dialog, I have a Collection or Array of Strings that I want to use to inform the user of some information. Code to compile those Strings into "clean" user-friendly text can be a pain to write ... for example, making sure the penultimate and last items are delimited by "and" instead of a comma especially when you don't know how many Strings will be included from the off.
Jan 62 min read
Â
Â


String interpolation
Interpolation means 'inserting one thing into another'. In this case, inserting one (or more) 'sub' Strings into another 'main' String.
Apr 7, 20253 min read
Â
Â


Articles: Blog2
bottom of page