Worksheet Copying.........crashes !!!

  • Thread starter Thread starter sconly
  • Start date Start date
S

sconly

:confused:
I have a porblem with shared woorkbook, created in excel 2002, that is
password protected.

when opened/run in excel 97 it crashes on the following code (which
programatically creates a sheet from another):

' Now recreate from an image of the template
Sheets("Template").Select
Sheets("Template").Copy after:=Sheets(1)
Sheets(2).Name = "Report"

Is there some sort of compatibility issue that causes the above code to
crash in 97 but not in 2002 ?

any input/advise would be very much appreciated.

thanks !!!!
 
there is not reason that particular code shouldn't work.

This is a guess, but
after the crash, go into the vbe into tools=>references and see if any
references are marked as MISSING. If so, you need to fix that problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top