<-- Previous || Up || Next -->

Sequence String Function
Illustrate Values Class

Public Function SequenceString( _
      Optional ByVal vStart As Variant _
    , Optional ByVal VEND As Variant _
    , Optional ByVal vWidth As Variant _
    , Optional ByVal vFillChar As Variant _
    ) As Variant

Return a string containing a sequence of numbers.
The numbers are right justified and any empty spaces are filled with the character vFillChar.

Examples:
    SequenceString(1, 10, 2, "-") = " 1 2 3 4 5 6 7 8 910"
    SequenceString(6, 16, 2, " ") = " 6 7 8 910111213141516"
    SequenceString(6, 16, 2, "-") = "-6-7-8-910111213141516"
See also:
    RulerString Function
    RulerStringWithTabStops Function
vStart: The first number in the sequence. vStart defaults to 1 (one) if it is missing or Null or cannot be fixed up to a number.

vEnd: The last number in the sequence. vEnd defaults to 1 (one) if it is missing or Null or cannot be fixed up to a number.

Function returns an empty string if vStart is greater than vEnd.

vWidth: The space allocated for each number within the result string. vWidth defaults to 1 (one) if it is missing or Null or cannot be fixed up to a number.

Function returns an empty string if vWidth is < 1 (less than one).

vFillChar: The character used to fill any empty spaces within the result string. vFillChar defaults to the space character (" ") if it is missing, Null, an empty string, or cannot be fixed up to a String.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.