VBA – How to use “like” in VBA

Working with VBA has its beauty.

Especially when you need to build something like regex and you do not want to import a whole library for some reason, that is known only by you. Then you start googling and you finally somehow reach this site. Thus, in the following “article” I will simply show the console output from using the not so popular comparison “LIKE” in VBA. It works exactly as you would expect it to work, if you are coming from the database¬†world and it does what it has to do quite well:

like

If for any reason you need the text from the immediate window, here it is:

Tagged with: , , ,