The ability to write add-ins under VB 4.0 is a significant addition to the developer’s toolbox. However, writing and distributing add-ins can be fraught with many a mind-boggling experience. One of these is dealing with the mysterious message, ” ‘Add-In Name’ could not be loaded. Remove it from the list of available Add-Ins?” My experience has shown at least two causes for this error. The first reason is obvious. As in all good programs, you must prepare for any and all contingencies. Such preparation is even more necessary in an add-in. If your add-in encounters an untrapped error in the Connect event, the error is passed back to VB and the error message is displayed with no further explanation of what occurred. The obvious correction is to program for any and all errors.The second reason for the error is not so obvious. Registration problems can be particularly hectic for add-ins. The normal procedure for registering an out-of-process add-in (EXE) is to execute it, say from the File Manager. The add-in includes code to register itself with VB (VB.INI entry), and VB itself registers the add-in (OLE server) in the Reg.Dat file. However, if you later move the add-in to another directory, and reexecute it, the error message can occur again because of conflicting entries in the Reg.Dat file. I recently discovered REGCLEAN.EXE (32-bit) and REGCLN16.EXE (16-bit) that ship with VB 4.0 in the ToolsPSS Directory of the CD. After two years of installing and removing numerous software packages from my development system, my Reg.Dat file had become so large that REGEDIT would not run because of a lack of memory. I ran REGCLN16 on my Windows 3.1, and it found 729 errors in my Reg.Dat file. After I set it to automatically clean up the file, I could run REGEDIT again and the problem with “unable to load add-in” disappeared.