From: Stefan Mahlitz Date: 2006-06-17T06:08:25+09:00 Subject: Re: undefined method (noMethodError) Parv G wrote: >> Um, that's because you reset @col to 'A' every time you call nextcell. >> >> get rid of that line in nextcell > > getting rid line *** @col = 'A' *** results in variable @col being nil. > And i can't compare nil with @maxCol (@maxCol = 'H'). This is because you mistyped initialize (I always do this). If you define @col in initialize it will be happy to be available through all instance methods. Stefan