G
Guest
I have the following line of code in a model I have been developing.
Sheets("Standard data sheet").Copy Before:=Sheets("End data sheet")
Essentially my procedure involves copying the standard data sheet to
specific section of the workbook by clicking on a button. The standard sheet
is renamed with the contents of a range on the worksheet and users are
returned to the standard data sheet to enter another set of data. The intent
is that the users should be able to repeat this as often as necessary.
The procedure works fine for about 8 - 10 copies of the standard sheet, but
then on the next copy comes up with a 'run time 1004' error. The procedure
will work fine again, for a further 8 - 10 copies, if the model is closed and
re-opened again.
I have read that there was a bug in earlier versions of Excel relating to
this, but it was suggested that it was fixed in more recent versions. This
does not appear to be the case. I am using Excel 2002 SP3.
Any clarifications or suggested alternative work arounds (ie other than
closing and re-opening the file) would be appreciated.
Sheets("Standard data sheet").Copy Before:=Sheets("End data sheet")
Essentially my procedure involves copying the standard data sheet to
specific section of the workbook by clicking on a button. The standard sheet
is renamed with the contents of a range on the worksheet and users are
returned to the standard data sheet to enter another set of data. The intent
is that the users should be able to repeat this as often as necessary.
The procedure works fine for about 8 - 10 copies of the standard sheet, but
then on the next copy comes up with a 'run time 1004' error. The procedure
will work fine again, for a further 8 - 10 copies, if the model is closed and
re-opened again.
I have read that there was a bug in earlier versions of Excel relating to
this, but it was suggested that it was fixed in more recent versions. This
does not appear to be the case. I am using Excel 2002 SP3.
Any clarifications or suggested alternative work arounds (ie other than
closing and re-opening the file) would be appreciated.