|
我也来一个,呵呵.
Sub TestAaron()
Dim D1, D2 As Double
Dim t1, t2, t3 As Integer
D1 = Timer
For t1 = 123 To 333
t2 = t1 * 2
t3 = t1 * 3
Call AddNo(t1, t2, t3)
Next
D2 = Timer
Debug.Print (D2 - D1); "毫秒"
End Sub
Sub AddNo(ByVal t1 As Integer, ByVal t2 As Integer, ByVal t3 As Integer)
Dim I As New Collection
On Error GoTo Abc
I.Add Left(t1, 1), Left(t1, 1)
I.Add Right(t1, 1), Right(t1, 1)
I.Add Left(Right(t1, 2), 1), Left(Right(t1, 2), 1)
I.Add Left(t2, 1), Left(t2, 1)
I.Add Right(t2, 1), Right(t2, 1)
I.Add Left(Right(t2, 2), 1), Left(Right(t2, 2), 1)
I.Add Left(t3, 1), Left(t3, 1)
I.Add Right(t3, 1), Right(t3, 1)
I.Add Left(Right(t3, 2), 1), Left(Right(t3, 2), 1)
If I.Count = 9 Then Debug.Print "T1: " & t1 & " T2: " & t2 & " T3: " & t3
Abc:
Exit Sub
End Sub
|
|