How To Sanitize A Filename

As a part 2 to my post on Validating a Filename to ensure it conforms to Microsoft Windows naming convention, refer to:

I also wanted to demonstrate how we could alternatively sanitize any proposed filename.  So instead of validating, or reporting back issues with the proposed filename, how we could simply eliminate the issues and return a valid filename.

Continue reading

Determine If A Filename Is Valid

It is quite common in applications to allow the user to specify a path and/or filename for saving files.

As such, a best practice would be to validate the user’s input prior to blindly using it and perhaps getting errors and crashing our applications.

Thus, I thought I’d quickly share one possible way to tackle this.

Continue reading

Microsoft Word Bug – Character Count Is Wrong

Software Bug

Seems to be a trend by the Microsoft Word Dev Team, similarly to the Word count being incorrect

in my testing, so is the character count!

Continue reading

Microsoft Word Bug – Words Count Is Wrong

Software Bug

While working on my recent article

I also developed a Word automation function to utilize Microsoft Word’s built-in word count.

I figured it might have been the easiest solution to getting a quick and reliable word count from any string.

Boy was I wrong.

Continue reading

How To Count The Number Of Characters In A String

Ever needed to get the character count of a string?

Easy enough, right! Simply use the Len() function.

lLength = Len("My string to get the character count of.")

But what happens if you want the character count, but ignoring one or more characters? What if you don’t want to count “spaces”, or perhaps punctuation?

What do you do then?

Continue reading

Impact of VBScript Deprecation

As an FYI for those of you curious, I’ve been trying to ascertain the true impact of the VBScript deprecation.

Sadly, the official announcement provides 0 details whatsoever as to the impacted libraries/components. Feel free to check for yourself by using the 2 links provided below:

Continue reading

How to do Hashing & Encryption in VBA

We live in a world where data security and communications need to be stored and transmitted safely. Hence, it is evermore critical to use hashing and/or encryption/decryption techniques.

I’ve previously discussed this a little and provided a couple possible approaches:

Today, I wanted to provide yet another possible solution to this matter.
 
Continue reading

Microsoft Access Navigation Pane Selection Bug

Well, here’s one more to add to the list of bugs within Microsoft Access.

The issue is that, as shown in the following screen recording, if you make multiple object selections in the Microsoft Access Navigation Pane and then de-select items, it does not properly reflect the de-selections.

I click and click and click, over and over, to select and/or de-select object yet it always remains highlighted.

So even when you de-select items, they remain visually highlighted as if they are still selected even though that is no longer the case. Because of this issue, you simply have no way of knowing what is actively selected, or not!
Continue reading

The End of RegEx in VBA, Not Quite So Fast!

So a short while ago Mike Wolfe mentioned that Microsoft had announced they were going to phase out and retire VBScript

and the implications of this could be far reaching impacting all sorts of things, most notably the possible loss of:

  • File System Object (FSO)
  • Regular Expressions (RegEx)
  • and more

All that has officially been stated is

Effective October 2023, VBScript is deprecated. In future releases of Windows, VBScript will be available as a feature on demand before its removal from the operating system.Microsoft
VBScript will be available as a feature on demand before being retired in future Windows releases. Initially, the VBScript feature on demand will be preinstalled to allow for uninterrupted use while you prepare for the retirement of VBScript.Microsoft

Now let’s be clear here, we are all still waiting for clarifications to come from Microsoft on the subject so we can truly know 100% what will be lost when this does actually occurs, which libraries are going to disappear.  Everything up until now is simply logical assumptions based on what we know of the libraries, but no official specifics have truly been given to date. (and yes, many people have asked for clarifications, but none have been given thus far)

Continue reading