Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Creatn multiple sheets in single workbook

Hi, wonder if anyone can help me. I have a Macro that generates a series of
worksheets in a single workbook based upon a sheet in the workbook which
contains a series of numbers. Each sheet contains information relating to the
number found in the first worksheet via a series of look ups.

However the problem relates to how many workbooks I can insert, when I first
developed the macro it ran fine and generated around 750 sheets. Now however
it keep stopping at 186 sheets, and gives an error that it can't create
another sheet, the basis of the macro I am using is :

x = 6 'the numer of sheets to start inserting new ones after

For a = 1 To 1000
Sheets("fap template").Copy After:=Sheets(x)
sh = x + 1
Sheets(sh).Select

'rename sheet and then do series of look ups and populate
Next a




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Creatn multiple sheets in single workbook

Hi

See this KB

Copying Worksheet Programmatically Causes Run-Time Error 1004
http://support.microsoft.com/default...84&Product=xlw


--
Regards Ron de Bruin
http://www.rondebruin.nl


"ah666" wrote in message ...
Hi, wonder if anyone can help me. I have a Macro that generates a series of
worksheets in a single workbook based upon a sheet in the workbook which
contains a series of numbers. Each sheet contains information relating to the
number found in the first worksheet via a series of look ups.

However the problem relates to how many workbooks I can insert, when I first
developed the macro it ran fine and generated around 750 sheets. Now however
it keep stopping at 186 sheets, and gives an error that it can't create
another sheet, the basis of the macro I am using is :

x = 6 'the numer of sheets to start inserting new ones after

For a = 1 To 1000
Sheets("fap template").Copy After:=Sheets(x)
sh = x + 1
Sheets(sh).Select

'rename sheet and then do series of look ups and populate
Next a






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Creatn multiple sheets in single workbook

Thanks I have now got a series of sheets inserts, however I cant find a away
using sheets.add of selecting the location in a workbook I want the sheet
added, in my original formula I copied the sheets after sheet(x) but cant see
how to add the sheet after sheet x

"Ron de Bruin" wrote:

Hi

See this KB

Copying Worksheet Programmatically Causes Run-Time Error 1004
http://support.microsoft.com/default...84&Product=xlw


--
Regards Ron de Bruin
http://www.rondebruin.nl


"ah666" wrote in message ...
Hi, wonder if anyone can help me. I have a Macro that generates a series of
worksheets in a single workbook based upon a sheet in the workbook which
contains a series of numbers. Each sheet contains information relating to the
number found in the first worksheet via a series of look ups.

However the problem relates to how many workbooks I can insert, when I first
developed the macro it ran fine and generated around 750 sheets. Now however
it keep stopping at 186 sheets, and gives an error that it can't create
another sheet, the basis of the macro I am using is :

x = 6 'the numer of sheets to start inserting new ones after

For a = 1 To 1000
Sheets("fap template").Copy After:=Sheets(x)
sh = x + 1
Sheets(sh).Select

'rename sheet and then do series of look ups and populate
Next a







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Creatn multiple sheets in single workbook

Try this

x = 6 'the numer of sheets to start inserting new ones after
For a = 1 To 200
Sheets.Add Type:="C:\aaa.xlt", after:=Sheets(x)
x = x + 1
Next


--
Regards Ron de Bruin
http://www.rondebruin.nl


"ah666" wrote in message ...
Thanks I have now got a series of sheets inserts, however I cant find a away
using sheets.add of selecting the location in a workbook I want the sheet
added, in my original formula I copied the sheets after sheet(x) but cant see
how to add the sheet after sheet x

"Ron de Bruin" wrote:

Hi

See this KB

Copying Worksheet Programmatically Causes Run-Time Error 1004
http://support.microsoft.com/default...84&Product=xlw


--
Regards Ron de Bruin
http://www.rondebruin.nl


"ah666" wrote in message ...
Hi, wonder if anyone can help me. I have a Macro that generates a series of
worksheets in a single workbook based upon a sheet in the workbook which
contains a series of numbers. Each sheet contains information relating to the
number found in the first worksheet via a series of look ups.

However the problem relates to how many workbooks I can insert, when I first
developed the macro it ran fine and generated around 750 sheets. Now however
it keep stopping at 186 sheets, and gives an error that it can't create
another sheet, the basis of the macro I am using is :

x = 6 'the numer of sheets to start inserting new ones after

For a = 1 To 1000
Sheets("fap template").Copy After:=Sheets(x)
sh = x + 1
Sheets(sh).Select

'rename sheet and then do series of look ups and populate
Next a









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
single entry across multible sheets in workbook George Excel Worksheet Functions 2 August 26th 08 07:46 PM
Multiple workbook data imported into single workbook SaipanRick Excel Worksheet Functions 4 June 16th 08 08:22 PM
continuous page numbering multiple sheets of a single workbook? Mulitplesheet numbering Excel Worksheet Functions 1 July 24th 05 03:42 PM
Multiple sheets using single chart roumi Excel Programming 3 June 9th 05 07:03 AM
Single list from multiple sheets Brian H Excel Worksheet Functions 1 November 12th 04 09:21 PM


All times are GMT +1. The time now is 12:18 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"