ArraySort (c) Cyber Solutions Ltd 2002

Register

If you intend to use Array you must PAY for it. This is a trial version and is limited in time it can be used. 

To register all you need to do is make a donation using PayPal

The donation can be anything depending on how you value the program - anything from $1 upwards although we feel the program is worth more.


Use PayPal - https://www.paypal.com.  Our email is tollside@yahoo.com. Put Array in the subject. The registered copy will be emailed to you - there are no message boxes in this version and it is not restricted.

Advantages of registering:

1. You get the registered copy without message boxes and restrictions which you can incorporate into your own application for use by third parties.

2. You get full support from tollside@yahoo.com - any problems just email and they will be immediately sorted out.

3. You will receive free notification of new products and you will receive free upgrades if this product is modified


Overview

ArraySort is a DLL which allows sorting and searching of a one or two dimensional array.  Sorting can be ascending or descending and specific columns can be excluded from the sorting. Searching can be case sensitive or non case sensitive. For sorting the sorted array is returned as a variant array.  For searching the search results are returned as row/column coordinates in a string with ; delimiters.     The DLL may be referred to from any Microsoft application e.g. Visual Basic, Access VBA, Excel VBA.


Setup

Run SETUP.EXE to register the DLL.  In Visual Basic, take the Project option on the menu and select References.  If you cannot see ArraySort, use the browse button to find it. Select the check box against it so that this is ticked.  In Access open a module and select Tools / References fom the menu. In Excel use Alt-F11 to open the code window and use Tools / References from the menu.

Syntax:

ArraySort(A,[Direction],[NoSort])

A is the name of the array to be sorted (up to 2 dimensions)

Direction (optional) is a string containing A (ascending) or D descending. Not case sensitive.

NoSort (optional) is a string containing column numbers in the array which are not to be sorted.  Deliminated by , e.g. "2,3" to exclude sorting on columns 2 and 3.


ArraySearch(SA,SearchString,[MatchCase])

SA is the name of the array to be searched (up to 2 dimensions)

SearchString is the string to search for - this can be a partial value of an array value.

MatchCase (optional) - boolean value determines whether search is case sensitive.


Sample Code:

Dim ar(4, 1)
ar(0, 0) = "one"
ar(1, 0) = "two"
ar(2, 0) = "three"
ar(3, 0) = "three"
ar(4, 0) = "two"
ar(0, 1) = "one1"
ar(1, 1) = "three1"
ar(2, 1) = "three1"
ar(3, 1) = "four1"
ar(4, 1) = "abc"
Dim x As Variant
Dim a As New Sort
temp = a.ArraySearch(ar, "Two")
MsgBox temp
x = a.ArraySort(ar,"D", "1")
For n = LBound(x) To UBound(x)
    MsgBox x(n, 0) & "  " & x(n, 1)
   
Next n


Temp will give the value "1,0;4,0;"
The variant array x will contain the sorted values of the array ar - column 1 will not be sorted. Order will be descending.

The DLL only works for arrays up to 2 dimensions - using it with a larger number of dimensions will cause unpredictable results and loss of data.



Email tollside@yahoo.com for help

The product is supplied on an 'as is' basis and Cyber Solutions Ltd accept no liability for any damage caused by installing or using it.