Archive Collection: String Functions

I'm on vacation (shh...don't tell anyone)! I'll be back soon, but until then enjoy today's curated collection of articles from the archive. Today's topic: String Functions.

Archive Collection: String Functions

I've been writing a daily article here since September 1, 2020; that's over 1,200 articles.  I haven't missed a day yet, and that includes Christmas and Easter. I'm currently on a family vacation, which makes maintaining this streak a bit...tricky.

I'm writing this in the present tense, but I'm writing it for future publication with links to past articles.  Let's hope the time-space continuum holds up.

In any case, as the slacker Firstie says to the Stony Lonesome Gate guard twenty minutes before Taps, let me get to the Point.  I've got a daily publishing streak to keep up.  But I don't want to be writing and publishing articles on vacation.  And I still want to provide you with something of value to read each day.  So I settled on creating a series of curated article lists that I think you'll find beneficial.

I'm hoping at least some of these articles are ones you haven't read before.  And if you're so obsessed with me that you have read all my articles, I'm hoping that they'll keep you busy enough that you don't come looking for me and my family 😳.  


String Functions

The Pluralize Function
You don’t have to settle for messages like, “1 record(s) inserted.” This simple function is an easy way to format strings for pluralization in VBA.
How to Remove Special Characters from a VBA String
A simple function to remove special characters from a string in VBA. Useful for sanitizing file names, sheet names in Excel, and lots of other stuff.
Come Together
Do you build strings in loops? Stop trimming the delimiter at the end of the loop. There’s a better way.
Part and Parse()-l
Take the Tag property and OpenArgs argument to the next level. This function makes it easy to assign and extract multiple values from a single string.
Quoth thy SQL? Evermore!
Solving the “O’Malley problem” with dedicated functions to sanitize our strings. Little Bobby Tables would be proud.
Dt() Function v3: Refactoring with Automated Tests
Reader Brenda Bachtold provides a more readable version of my date-wrapping function. Automated doc tests prove that her version functions the same as mine.
Now you have two problems
Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems. --Jamie Zawinski
CreateGuid: A Reliable Way to Generate GUIDs in VBA
A well-tested method to generate GUIDs in both 32-bit and 64-bit VBA.
Converting Numbers to Text
Need to print business checks directly from Microsoft Access? You’ll need a way to convert numbers into text. The NumToString function does just that.

Additional Reading

Code Library
Building Your LibraryThirteen years ago, I chose to maintain a folder of textfiles rather than a single Access database library. I’ve never once regrettedthat decision.No Longer SetMike Wolfe []TheDependency TrainLet’s torture a train metaphor to illu…

All original code samples by Mike Wolfe are licensed under CC BY 4.0