Ever needed to make a PC Shutdown, Reboot, Hibernate, … after running some code?
As with most things, there are a number of possible approaches, but today I thought I’d demonstrate a very simple solution using the Shutdown command:
Ever needed to make a PC Shutdown, Reboot, Hibernate, … after running some code?
As with most things, there are a number of possible approaches, but today I thought I’d demonstrate a very simple solution using the Shutdown command:
Ever needed or wanted to be able to lock the PC? Perhaps after running your code?
Well it is surprisingly simple to do!
Luckily for us, there is a simple API we can implement to do all the heavy lifting. All we need to do is build a simple wrapper function around it as demonstrated below:
If you’ve ever seen any of my posts about the Microsoft Roadmaps, I typically provided a screenshot showing all the items expanded. For instance, in my post:

or

One of my preferred add-ins for VBA development for many years was a small little indenting utility called Smart Indenter. It did one thing, automatically indent code to make it much more legible, but it did it well!
It has always been part of my add-ins page because it was so good:
Sadly, it seemed the product was abandoned by its’ developer some time around when Office 2007/x64 surfaced.
Over the years, I have seen people reporting various hacks to make the older version work with newer versions of office (I report a solution that worked for me), but others report those same hacks not solving the issue for them. So it was a little luck of the draw if you could get it working. I had a few posts on this as well:
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.
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.
Have you ever needed to count the number of words in a string?
Let’s explore a few ways we can achieve this.
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?
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:

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