
Use the MsgBox Wrapper to Replace OK
Replace all MsgBox calls that display only an OK message with the following OkMsg sub. It automatically defaults the icon to vbInformation, and the title to a global constant defined
Replace all MsgBox calls that display only an OK message with the following OkMsg sub. It automatically defaults the icon to vbInformation, and the title to a global constant defined
With the advent of the FAT32 file system, you might want to use VB to determine the type of file system being used for a particular drive. This example is
The value of a loop counter variable is incremented one beyond the set range when the loop is completed. For example, if you use a For i = 0 to
You often need to reattach or refresh links in Microsoft Access. This code refreshes all currently linked tables to sync the attached tables with the server, then remove “dbo_” from
The data control allows you to quickly link controls and databases; however, not only is it far from flexible compared with the database-objects coding interface, it doesn’t look great. I
VB6 introduced the Split function, which returns a zero-based, one-dimensional array containing a specified number of substrings. Although this function is useful in itself, you can also use it in
It’s too bad Microsoft didn’t create the Split function until VB6, but here’s a function that duplicates it for VB4 and VB5 users. The only difference is that with VB4
Here’s a useful procedure to position a ComboBox according to a value of the ItemData property or the List property. It’s useful to position a ComboBox with values taken from