Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating an array, using it then emptying it then repeating

Status
Not open for further replies.

emozley

Technical User
Jan 14, 2003
769
GB
Hi,

I have a calendar and in each cell I want to look in an array and then take some records from that into another array if a condition is met.

The value stored in HolidaysArray(12,z) is true or false and says whether someone is in the Admin department. If someone is I want to add their first name HolidaysArray(10,z)into the AdminRequestsArray.

What is the best way to set up and empty the AdminRequestsArray array for each cell. I'm guessing it would be somewhere arround the AdminCounter=0 line.

Thanks very much and I hope it makes sense!

Ed

If RequestsArray=TRUE Then
AdminCounter=0
For z=0 to UBOUND(HolidaysArray,2)
If DatePart("d", HolidaysArray(2,z))=counter Then
If HolidaysArray(12,z)=True Then
AdminRequestsArray(0,AdminCounter)=HolidaysArray(10,z)
AdminCounter=AdminCounter+1
End If
End If
Next
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top