Hi,
Sorry for troubling, i have a function below written in vb macro which can display 24 permutation numbers base on a input number.
I would like this function work in asp (active server page) to display the list of 24 numbers in browser. Im not very familiar of the syntax,
i someone here could help me to convert below function to asp scripts.and able display 24 numbers in the page... thanks...
Note: it seem i paste below code appear non structure...i attached an exel file with macro of this function for your review

Private Function CalculateNumbers() As Integer()

'Get input number
Dim InputNumber As Integer
InputNumber = 2345

'Make 4 digit text if InputNumber is less than 1000
Dim InputNumberText As String
InputNumberText = Format(InputNumber, "0000")

'Split digits
Dim N(4) As String

N(0) = Mid(InputNumberText, 1, 1)
N(1) = Mid(InputNumberText, 2, 1)
N(2) = Mid(InputNumberText, 3, 1)
N(3) = Mid(InputNumberText, 4, 1)

'Calculate Numbers
Dim Result(24) As Integer

For i = 0 To 3 Step 1
For j = 0 To 3 Step 1
If j <> i Then
For k = 0 To 3 Step 1
If k <> i And k <> j Then
For q = 0 To 3 Step 1
If q <> i And q <> j And q <> k Then
Result(Record) = 1000 * N(i) + 100 * N(j) + 10 * N(k) + N(q)
MsgBox ("Record " + CStr(Record + 1) + " : " + CStr(Result(Record)))

Record = Record + 1
End If
Next q
End If
Next k
End If
Next j
Next i


CalculateNumbers = Result

End Function