November 6, 1998

Place a Variable-Length String in Text

VB doesn’t have a function to replace part of a string (of n-length) with another string (of x-length). The Mid() statement works only with target and replacement strings of the

Add Columns to a Standard VB List Box

Use the Win32 API to set tab stops in a Visual Basic list box by creating these declarations and routine in a module: Public Const LB_SETTABSTOPS = &H192Declare Function SendMessage

Force Uppercase Characters in a Text Box

To change text in a text box to uppercase as soon as the user types it in, use this code: Private Sub txtname_KeyPress(KeyAscii As Integer) ‘Puts in uppercase as soon

Register ActiveX Components Manually

Not all ActiveX DLL and OCX files include installation programs to properly register the control. You need to run REGSVR32.EXE manually to perform the registration. You can save time by

Destroying Collections’ Items

Many programmers mistakenly believe they can remove all the items from a collection by setting the collection itself to Nothing: Dim children as New Collection…Set children = Nothing This technique