How to decompose your Access application into files

Decomposing your Access application into external files can be useful for external process automation of source code, version control, or disaster recovery. An Access application is composed of objects of different nature, like forms, reports, queries, macros, code and class modules. Hopefully, you’re already splitting your solutions in separated databases. This for a good reason,… Continue reading How to decompose your Access application into files

How to darken or lighten an RGB color in VB/A

Generate a light or dark color shade from an RGB color value. The ShadeColor() function takes an RGB color value (a Long) and applies a shading algorithm, converting to HSV to darken or lighten the color, then back to RGB to use it in VB/A. Download sample Access database with the code.Then open the frmShadeTest… Continue reading How to darken or lighten an RGB color in VB/A

How to validate an IBAN code with VB/A

Bank accounts are identified with a standardized IBAN code that simplifies international transactions. The code identifies the country, the banking institution and a customer account. You’ll find a function to validate an international Bank account IBAN identifier with VB/A in this post, along with a bunch of test IBANs. There’s a “checksum” contained in the… Continue reading How to validate an IBAN code with VB/A

Solving the Unicode, UTF8, UTF16 and Text Files conundrum in VBA

Understanding Unicode variants like UTF8 and UTF16 and how they impact your Office VBA development is not so straightforward. This post will guide thru the experience of reading a text file with VBA, explain some of the pitfalls you may encounter on this path when dealing with different text encodings and file formats. We’ll shed… Continue reading Solving the Unicode, UTF8, UTF16 and Text Files conundrum in VBA

Using national language support in Office with VBA

Localization demo application screenshot

If you need to handle multiple languages, get some specific regional settings, or do things like implement dynamic runtime language switching in your Microsoft Office solutions, you can leverage some additional help using the national language support Win32 API in VBA. Do you know why you have to use the US English date format when… Continue reading Using national language support in Office with VBA

Explaining the real time device detector Access demo database

In this post, we’ll examine and explain how the Access application that demonstrates a possible, real life use case, of the device detection feature of the AxDeviceDetector ActiveX server. See the downloads section below to download a copy of the database. Scenario We want to allow, let’s say, restaurant waiters or employees, to register their… Continue reading Explaining the real time device detector Access demo database

How to get useful Windows device information in VBA

Here are (at least) 3 properties of hardware like hard disks (whether they are HDD, SSD, USB or else), printers or anything else that Windows considers a device. These can be very useful to obtain in applications that manage enterprise assets like data and documents: Vendor name, Vendor ID, and serial number. These hardware properties… Continue reading How to get useful Windows device information in VBA

How to round a number to a five cents multiple in VB/A

In switzerland, we like rounding monetary numbers to 2 decimal places, with multiples of 5 for the fractional part. This is (probably) because our (physical) money has no “cent” coins, but we have 5 cents coins. That’s commonly called “5 cents” rounding. Example: 1.6777777 becomes 1.70 1.4444444 becomes 1.45 1.0333333 becomes 1.05 and so on.… Continue reading How to round a number to a five cents multiple in VB/A

How do I compute the length of the longest text for a date in Word ?

A Word document to compute the length of the longest text for a date in Word. Working on the layout of a Microsoft Word French and English versions of a document template with a customer, we were trying to determine where to position a tab, so that we had the document date appear on the… Continue reading How do I compute the length of the longest text for a date in Word ?

Comment connaître la longueur du plus long texte de la date du jour de l’année avec Word ?

Je travaillais hier matin avec un client sur son modèle de lettre Word. Sur ce modèle de lettre que l’on veut décliner en français et en anglais, la date est positionnée grâce à un tabulateur, vers le bord droit de la page. On a naturellement écrit la date du jour, lundi 18 janvier 2016, pour… Continue reading Comment connaître la longueur du plus long texte de la date du jour de l’année avec Word ?