Drew Wutka
DWUTKA at Marlow.com
Fri Apr 23 10:26:38 CDT 2010
LOL, nah, I'll stick with 'code boy'
Private Sub Command1_Click()
Dim Victims As Collection
Dim vt As Victim
Dim i As Long
Dim strTemp As String
Dim strPaste As String
Set Victims = New Collection
For i = 1 To 1000
Set vt = New Victim
vt.OriginalPosition = i
Victims.Add vt, "ID:" & i
Set vt = Nothing
Next i
Do Until Victims.Count <= 1
For i = 1 To Victims.Count Step 2
Set vt = Victims(i)
vt.Shot = True
Set vt = Nothing
Next i
'Remove shot victims
strTemp = ""
For Each vt In Victims
If vt.Shot Then
Victims.Remove "ID:" & vt.OriginalPosition
Else
strTemp = strTemp & vt.OriginalPosition & ","
End If
Next
Me.List1.AddItem Left(strTemp, Len(strTemp) - 1)
strPaste = strPaste & Left(strTemp, Len(strTemp) - 1) & vbCrLf
Loop
Clipboard.Clear
Clipboard.SetText strPaste
End Sub
Drew
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: Friday, April 23, 2010 10:23 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] OT: Friday Puzzles
> Final Survivor:
> 512
I grumb...grovel at your feet o' great one. :)
Susan H.
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
The information contained in this transmission is intended only for the person or entity
to which it is addressed and may contain II-VI Proprietary and/or II-VI Business
Sensitive material. If you are not the intended recipient, please contact the sender
immediately and destroy the material in its entirety, whether electronic or hard copy.
You are notified that any review, retransmission, copying, disclosure, dissemination,
or other use of, or taking of any action in reliance upon this information by persons
or entities other than the intended recipient is prohibited.