View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Creating New sheets

Jason,

I remember reading about this somewhere..

If memory serves me.. it has to do with the naming of the sheets.

Can it be that:
a: the sheet name gets longer then 32 chars?
b: the sheet's instance name gets corrupted on copy and becomes
something like sheet11111111111

I mean the (name) property for the sheet in VBE's properties window,
It's the first property listed in that window, not the name property.


HTH


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Jason" wrote:

Hi All

I have a programme that creates a fair number of sheets,
but if I run it about 2 - 3 times then Excel bugs out with
the error message of "Copy method of Worksheet Class
failed".

The problem isn't to do with the amount of worksheets in
the book as each time I delete them before I start, so as
far as I can workout each time that I create a new
worksheet excell puts something in memory and when it's
memory gets full it spits out an error.

I have no idea how to fix this and any advice would be
greatly appreciated.

Thanks Heaps
Jason