View Single Post
Old June 12th, 2003, 02:18 AM
phil phil is offline
Authorized User
Join Date: Jun 2003
Location: , , Japan.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts

Are you getting an error message? If so, what?

Two things to check

1. Does Country(i,1) return a string or a long/integer corresponding to an existing sheet.

2. Is maxdate a date or a long/integer?
If date try ...., Cells(2,DatePart("yyyy",maxdate)-1987), also checking that the year of maxdate>=1989

Adding the following above the line should tell you which is the problem
Debug.Print Country(i, 1); maxdate