Thread: Error in loop
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Daniel Bonallack[_2_] Daniel Bonallack[_2_] is offline
external usenet poster
 
Posts: 27
Default Error in loop

I'm creating new sheets by copying a template sheet.
My loop requires that Excel make about 90 sheets and place
them at the end. After the 15th however, it seems to run
out of memory and just give me an error. Even when I
switch to Excel, I can't even manually copy a sheet:

This is my copy line to be repeated 90 times.
Sheets("Template").Copy After:=Sheets(Sheets.Count)

Any ideas?

Thanks
Daniel