Scriptorium

us fr nl




VBA: Text

Search for values in worksheets and copy matches to a results worksheet
Every now and then I read a question on a forum that has to do with finding values in worksheets. Often they want to copy found matches to a results worksheet. This routine shows how to achieve this.

Convert a number to it's string equivalent, fully written
This is a User Defined Function that consists of two seperate functions. The input is a Cell address and a syntax code. The syntax code determines how digits are converted to text. The usage is displayed inside the code.

Parsing multiple number input from a TextBox
Sometimes you want to enter multiple numbers into a TextBox. For example, when you want to print multiple pages from Word you can enter the numbers into a textbox. Either by entering a range with a dash separator or several pages with a comma separator. (e.g. 1-4,6,9) This sub routine takes input from a TextBox on a UserForm and filters out preceding zero's and spaces. Then it converts the entered string, consisting of number characters and separators, and stores all parsed numbers (still as a string) into an array variable. For demonstration purposes the array variable contents are then displayed.

Atom Feed
Contact | About This Application | Scriptorium Website