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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Amend the coding so it equals to CountryID

Status
Not open for further replies.

mchoudhury

Programmer
Nov 26, 2004
71
GB
Hi Guys,
this is my coding:

For c = 0 To CCL.Count - 1

If Country1 > 0 Then

BTCountry1Daytime = CCL.Item(c).PeakPerMin / 100
BTCountry1Evening = CCL.Item(c).OffPeakPerMin / 100
BTCountry1Weekend = CCL.Item(c).WeekendPerMin / 100

End If
If Country2 > 0 Then

BTCountry2Daytime = CCL.Item(c).PeakPerMin / 100
BTCountry2Evening = CCL.Item(c).OffPeakPerMin / 100
BTCountry2Weekend = CCL.Item(c).WeekendPerMin / 100

End If
If Country3 > 0 Then

End If
Next c

How can i amend the for loop, so CCL.Item(c) is equals to the value of Country1 or Country2 in each if statement. i.e. if Country1 = 1 then this should be CCL.Item(1) and same for Country2

Thanks
Mac
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top