Mike Mattys
mmattys at rochester.rr.com
Fri Apr 23 10:47:34 CDT 2010
Hi Drew, It appears that you have a reference set that I don't have What library in Victim in? Michael R Mattys Business Process Developers www.mattysconsulting.com ----- Original Message ----- From: "Gustav Brock" <Gustav at cactus.dk> To: <accessd at databaseadvisors.com> Sent: Friday, April 23, 2010 11:38 AM 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 >