Modulo 11 checksum verification in VBA

Modulo 11 is a method to calculate checksums or verification digits to numeric data. Its used extensively throughout the world in cases such as bankaccount numbers, creditcard numbers, ISBN numbers and the like. The basic idea is not as much encryption or something similar, but more a protection against human errors. By calculating and verifying the checksum you can quickly detect cases like changing a single digit, switching digits, missing a digit, etc. By verifying a number as early as possible, you can decrease the amount of rubish entering a business process, and hence ease operations.

Continue reading

Storing data in a Base64 encoding using VBA

Here’s some code that I’m pretty proud of, its a nifty piece of code that allows to store any kind of data in a simple textbased container. It uses a custom Base64 encoding to store integers, floats, strings, booleans or blobs in a text block and adds some CRC checks and even some repair capabilities.

Continue reading

Catching all changes on an Outlook folder

I found events in microsoft outlook to be unreliable. If a modal dialog box is open (eg. MsgBox or InputBox) or a piece of code takes to long to complete, events in the background will be cancelled.  This class tries to catch the Add and Change events of a folder but will also check, after handling an item, if additional changes have occured and will then handle those subsequentially. Continue reading