Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Unable to copy sheet

I have a macro that takes data from a list and uses this to create a model in
a separate sheet (called 'model'). It then takes a copy of that sheet
(creating 'model (2)') and then renames the model with the person's name to
whom it relates (e.g. model_john').

It then repeats the process using the next column of data.

All works well for about 20 columns/models (it is always the same number)
and then I get an error 1004 at the command:

Sheets("model").Copy Befo=Sheets("INDEX")

Furthermore, if I then try to copy a sheet manually, nothing happens.
However, if I open a new book, I can copy a sheet in that and, when I return
to the problem book, I can copy sheets again.

It is Excel XP running on Windows XP. The workbook is read only. There is
no protection applied.

Ian
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Unable to copy sheet

Try saving the workbook every 10 sheets/Columns.

--
Regards,
Tom Ogilvy


"IanC" wrote:

I have a macro that takes data from a list and uses this to create a model in
a separate sheet (called 'model'). It then takes a copy of that sheet
(creating 'model (2)') and then renames the model with the person's name to
whom it relates (e.g. model_john').

It then repeats the process using the next column of data.

All works well for about 20 columns/models (it is always the same number)
and then I get an error 1004 at the command:

Sheets("model").Copy Befo=Sheets("INDEX")

Furthermore, if I then try to copy a sheet manually, nothing happens.
However, if I open a new book, I can copy a sheet in that and, when I return
to the problem book, I can copy sheets again.

It is Excel XP running on Windows XP. The workbook is read only. There is
no protection applied.

Ian

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Unable to copy sheet

No luck. Even cut down the save to every 5 but without success.


Ian

"Tom Ogilvy" wrote:

Try saving the workbook every 10 sheets/Columns.

--
Regards,
Tom Ogilvy


"IanC" wrote:

I have a macro that takes data from a list and uses this to create a model in
a separate sheet (called 'model'). It then takes a copy of that sheet
(creating 'model (2)') and then renames the model with the person's name to
whom it relates (e.g. model_john').

It then repeats the process using the next column of data.

All works well for about 20 columns/models (it is always the same number)
and then I get an error 1004 at the command:

Sheets("model").Copy Befo=Sheets("INDEX")

Furthermore, if I then try to copy a sheet manually, nothing happens.
However, if I open a new book, I can copy a sheet in that and, when I return
to the problem book, I can copy sheets again.

It is Excel XP running on Windows XP. The workbook is read only. There is
no protection applied.

Ian

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Unable to copy sheet

Might want to add the number of sheets you need, then copy the data over to
those sheets.

Previous discussions on this have alluded that the problem is the number of
copy actions rather than the number of sheets. You might create a new
workbook using a template sheet and specify it to be created with the number
of sheets you need. then copy those sheets as a group over to your workbook.
then close the dummy workbook without saving changes.

Also make sure zoom is set to 100 and avoid having objects on the sheets if
possible.

--
Regards,
Tom Ogilvy


"IanC" wrote:

No luck. Even cut down the save to every 5 but without success.


Ian

"Tom Ogilvy" wrote:

Try saving the workbook every 10 sheets/Columns.

--
Regards,
Tom Ogilvy


"IanC" wrote:

I have a macro that takes data from a list and uses this to create a model in
a separate sheet (called 'model'). It then takes a copy of that sheet
(creating 'model (2)') and then renames the model with the person's name to
whom it relates (e.g. model_john').

It then repeats the process using the next column of data.

All works well for about 20 columns/models (it is always the same number)
and then I get an error 1004 at the command:

Sheets("model").Copy Befo=Sheets("INDEX")

Furthermore, if I then try to copy a sheet manually, nothing happens.
However, if I open a new book, I can copy a sheet in that and, when I return
to the problem book, I can copy sheets again.

It is Excel XP running on Windows XP. The workbook is read only. There is
no protection applied.

Ian

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Unable to copy sheet

Many thanks.

Reassuring to know that it is not a coding error. I will adopt your ideas
as a workaround.


Ian

"Tom Ogilvy" wrote:

Might want to add the number of sheets you need, then copy the data over to
those sheets.

Previous discussions on this have alluded that the problem is the number of
copy actions rather than the number of sheets. You might create a new
workbook using a template sheet and specify it to be created with the number
of sheets you need. then copy those sheets as a group over to your workbook.
then close the dummy workbook without saving changes.

Also make sure zoom is set to 100 and avoid having objects on the sheets if
possible.

--
Regards,
Tom Ogilvy


"IanC" wrote:

No luck. Even cut down the save to every 5 but without success.


Ian

"Tom Ogilvy" wrote:

Try saving the workbook every 10 sheets/Columns.

--
Regards,
Tom Ogilvy


"IanC" wrote:

I have a macro that takes data from a list and uses this to create a model in
a separate sheet (called 'model'). It then takes a copy of that sheet
(creating 'model (2)') and then renames the model with the person's name to
whom it relates (e.g. model_john').

It then repeats the process using the next column of data.

All works well for about 20 columns/models (it is always the same number)
and then I get an error 1004 at the command:

Sheets("model").Copy Befo=Sheets("INDEX")

Furthermore, if I then try to copy a sheet manually, nothing happens.
However, if I open a new book, I can copy a sheet in that and, when I return
to the problem book, I can copy sheets again.

It is Excel XP running on Windows XP. The workbook is read only. There is
no protection applied.

Ian

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I am unable to copy a worksheet Beto Excel Discussion (Misc queries) 12 March 9th 08 12:13 AM
Unable to Copy Add-in To Library Error John Hutcins Excel Programming 4 April 26th 06 06:33 PM
unable to copy ss# format in excel Caseybay Excel Discussion (Misc queries) 3 March 29th 06 08:21 PM
Unable to Copy and Paste Keith Excel Programming 4 March 10th 06 05:11 PM
unable to copy sheets Shane Excel Programming 0 September 28th 05 02:42 AM


All times are GMT +1. The time now is 06:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"