String function
Summary
Repeating character string.
Syntax
String(number, character)
The String function syntax has these named arguments:
Part
Description
numberRequired; Long. Length of the returned string. If number contains Null, Null is returned.
characterRequired; Variant. Character code specifying the character or string expression whose first character is used to build the return string. If character contains Null, Null is returned.
Part
Description
numberRequired; Long. Length of the returned string. If number contains Null, Null is returned.
characterRequired; Variant. Character code specifying the character or string expression whose first character is used to build the return string. If character contains Null, Null is returned.
Example
Example
This example uses the String function to return repeating character strings of the length specified.
Dim MyString
MyString = String(5, "*") ' Returns "*****".
MyString = String(5, 42) ' Returns "*****".
MyString = String(10, "ABC") ' Returns "AAAAAAAAAA".
This example uses the String function to return repeating character strings of the length specified.
Dim MyString
MyString = String(5, "*") ' Returns "*****".
MyString = String(5, 42) ' Returns "*****".
MyString = String(10, "ABC") ' Returns "AAAAAAAAAA".