Hello, The original question is below. Thank you for all of the responses. I received helpful suggestions from numerous people including Chris Beckcom, Thorsten Behrens, and Bernhard Stroebl. I used the code suggestion from Thorsten Behrens and it seems to work. These are there responses: Chris Beckcom: This sounds very similar to a No Free Channels problem I just had. In browsing the ESRI site, and the two ListServs I found something addressing the total number of Themes that can be managed at one time. The general theory is 50 is about the max before you start getting the dreaded No Free Channels error. You might try doing your processing in a two stage approach, merging 1 thru 26 and 27 thru 52 then merge the two resulting grids to get you where you need to go. My two-cents worth. Bernhard Stroebl I am not sure if this provides a solution for you as I never experienced the error you describe but you can probably achieve what you want by forcing the evaluation of the grid (say every twentieth loop) thus forcing ArcView to not keep all the grids in memory but writing results to hard disk. Check the online help for the discussion on the grid class ("Deferred evaluation"). Thorsten Behrens: the maximum count for grids is 49. There is a simple workaround: theList = SourceManager.ReturnDataSets(GRID, "Directory Identification") if (theList.Count = 0) then msgBox.Warning("No grid was chosen. Unable to get directory path. Exiting..", "No Grid Chosen") return nil end dirName = theList.Get(0) dirName.StripFile drainGfinal = 0.AsGrid for each num in 1..52 drainGString = (dirName.AsString + "\drain_" + num.AsString) drainGSrcName = Grid.MakeSrcName(drainGString) drainG = Grid.Make(drainGSrcName) drainGFinal = drainGFinal + drainG '#### build a temp grid #### if (num = 30) then theTempGrid = GTheme.Make(drainGFinal) drainGFinal = theTempGrid.GetGrid end '########################### 'av.purgeobjects end theView = av.GetActiveDoc drainGTheme = GTheme.Make(drainGfinal) theView.AddTheme(drainGTheme) original message: I have a set of 52 grids that have values for each week of the year that I want to use in a for each loop to do some calculations. When I try to do the loop I get an error message that either says 'No more Cell Layer Channels' or 'GetOpenTileChannel: Could not open tile'. I tried to do what was given in the ArcView Help about changing the number of descriptors in the config file but that did not work. I understand there is a limitation on the number of files that can be referenced or something but I don't know how to get around this. My script is below and basically it has the user identify a directory and then finds the files (drain_1...drain_52) and adds them together in the for each loop. This is not the calculation I will actually do but it is simpler to understand and if I get it to work the other calculation shoud work. Is there any way to cut off the reference to the draing each time so I don't end up with this error? Any other way to get around it? theList = SourceManager.ReturnDataSets(GRID, "Directory Identification") if (theList.Count = 0) then msgBox.Warning("No grid was chosen. Unable to get directory path. Exiting..", "No Grid Chosen") return nil end dirName = theList.Get(0) dirName.StripFile drainGfinal = 0.AsGrid for each num in 1..52 drainGString = (dirName.AsString + "\drain_" + num.AsString) drainGSrcName = Grid.MakeSrcName(drainGString) drainG = Grid.Make(drainGSrcName) drainGFinal = drainGFinal + drainG av.purgeobjects end theView = av.GetActiveDoc drainGTheme = GTheme.Make(drainGfinal) theView.AddTheme(drainGTheme) John DeGroote GIS and Data Services The Macaulay Institute Craigiebuckler Aberdeen Scotland UK AB15 8QH Tel: +(44) (0) 1224 498200 Fax: +(44) (0) 1224 311556 email: j.degroote@macaulay.ac.uk http://macaulay.ac.uk