Limit Number of Words Per Line By Number of Characters
Version Compatibility: Visual Basic 6
Example: After typing some text is a multi-line text box, you can add the following to a command button's click event to limit text to 72 characters per line:
Text1.Text = FormatByLength(Text1.Text, 72)
Instructions: Copy the declarations and code below and paste directly into your VB project.