Libraries of utility code

My use of libraries of VBA Code

I do not use VBA
0
No votes
I use VBA but do not make use of existing libraries of VBA code
2
22%
I use VBA and make use of other programmers existing libraries of VBA code
3
33%
I use VBA and build and maintain my own libraries of VBA code
4
44%
 
Total votes: 9

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15632
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Libraries of utility code

Post by ChrisGreaves »

So, I'm curious.
I was raised on libraries of code and cannot now imagine starting a VBA project without my libraries and other project management tools.
I would consider that you are using a library of VBA code if, in at least one of your VBA projects, you have used Tools, References to hook up to a previously developed VBA project, whether in Word, Excel, Outlook or whatever.
Thanks
Chris
There's nothing heavier than an empty water bottle

User avatar
Jay Freedman
Microsoft MVP
Posts: 1318
Joined: 24 May 2013, 15:33
Location: Warminster, PA

Re: Libraries of utility code

Post by Jay Freedman »

Years ago I did use libraries, both my own and others, especially for arcane topics such as dealing with zip and other compression schemes. As I've done less of that sort of thing lately, I also find that I've lost track of what functions are in which libraries. I also have less trust that other programmers' library functions are properly tested, or kept up to date with newer versions of Office and Windows.

As an example of the latter: This year Microsoft changed its default installation of Office 365 programs from 32-bit to 64-bit. Macros that call API functions using Win32 declarations have to be changed to call 64-bit versions with PtrSafe declarations, or else they'll throw compile errors when run in 64-bit Office.

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15632
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Libraries of utility code

Post by ChrisGreaves »

Jay Freedman wrote:... I also find that I've lost track of what functions are in which libraries.
Me too. I have around 500-1000 procedures in UW.DOT and the same number in Under(TheHood).dot. Fifteen years ago I started to document them all, but gave up. I know that I have two or more versions of some procedures because it was faster to write a new version than to locate the existing one.
... This year Microsoft changed its default installation of Office 365 programs from 32-bit to 64-bit. Macros that call API functions using Win32 declarations have to be changed to call 64-bit versions with PtrSafe declarations, or else they'll throw compile errors when run in 64-bit Office.
This bit me over a year ago. Some users were kind enough to tell me that the packages threw some sort of error; others just remarked "You application doesn't work".

I wrote PROJEct twenty years ago. It scours a computer and collects every scrap of VBA code - Word, Excel, Outlook, even TXT files - and builds a searchable library.
That too presented a problem. I could build the library overnight, but loading that library took so long that I would go and cook lunch while waiting to search for one procedure.

:sigh:

Cheers
Chris
You do not have the required permissions to view the files attached to this post.
There's nothing heavier than an empty water bottle