Drew Wutka
DWUTKA at Marlow.com
Fri Apr 23 10:59:15 CDT 2010
Still very busy... this was the 2 minute code whip up to solve the first riddle.... ;) Admittedly, I doubt they'd let me have my laptop after they asked the question! ;) Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Friday, April 23, 2010 10:38 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] OT: Friday Puzzles Hi Drew What is this? You always bark about how busy you are. Can't wait for Friday beer!? /gustav >>> DWUTKA at marlow.com 23-04-2010 17:26:38 >>> 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 -- 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.