September 30, 2000

Always use “$-typed” string functions

VB official documentation seems to encourage you to use “$-less” string functions, e.g. Left, LTrim or UCase, instead of their time-honored Left$, LTrim$ and UCase$ counterparts. If you do so,

LenB has changed from VB5 to VB6

Visual Basic stores UDTs in unpacked format, that is it alignes all UDT elements to the double word (except that Integers and Boolean are aligned to the word, and byte

Conversion to proper case

When dealing with proper names, you may want to capitalize the first letter of each word, e.g. convert “john smith” into “John Smith”. Under VB3 you had to write a

Error Handling and Corrections

The following is an example to handle errors in VB. It combines “On ErrorGoTo” and “On Error Resume Next” to handle all errors (minor orserious ones), as well as attempting