![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
Hello fellow xls'rs:
I have a workbook that has a long list of sheetnames in sheet1!A:A. In this same workbook I have a Master Sheet . I have a procedure that copies the mastersheet and then renames it.(using the list of names from sheet1!A:A.) This procedure works quite well until about the 39 loop and all of a sudden gives me a RunTime error 1004 and says "copy method of worksheet class failed" The line it fails on is this : Code:
Worksheets(SalesMasterSheet).Copy after:=Worksheets(LastMadeSheet) I've also run the procedure on different PC's with same result..... Any ideas ? [ This Message was edited by: nimrod on 2002-05-10 18:16 ] |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Excel97 ? - I beleive this is a known problem in copying sheets ie Sheets("master...").Copy Can't find the Ms Link but I beleive the work around is to add a New sheet & do a cells.copy & Paste to New sheet. |
|
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
|
|
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Quote:
Nimrod helps others all the time. S/he just responded to a post in Spanish! So, when Nimrod needs some assistance, this is your offering. Good job. Really impressive. Believe it or not, you can learn a lot here. Yet, I would imagine that not many people will offer any Excel help to you, should you ever need it. Quite a shame, actually. |
|
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
Thanks for the Comments Jay and Ivan. I do enjoy this board and the people on it. Everyone seems to be very supportive of one another.
|
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
Thanks for the suggestion Ivan . I'm actually using Office 2000 and usually keep up with the SP's! I'm going to try your suggestions and see where it takes me ... again thanks for the help.
__________________
<MARQUEE>...........Never be afraid to try something new. Remember, amateurs built the ark, professionals built the Titanic...............The easiest thing to find is fault, don't be easy !.. --Anonymous--...</marquee> |
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Shot in the dark. Has worked before for other "method" errors.
Place this: Worksheets(SalesMasterSheet).Range("A1").Activate Before your line of code: Worksheets(SalesMasterSheet).Copy after:=Worksheets(LastMadeSheet) Tom |
|
|
|
|
|
#8 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
Nope TS ....... that one didn't work :-| ...hmmm I'm going to keep trying
|
|
|
|
|
|
#9 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
Hi Ivan :
Your idea of copy and paste was good but unfortunately I loose all the page setup information and to set that stuff up through the macro slows everything considerably. Any other ideas ?
__________________
<MARQUEE>...........Never be afraid to try something new. Remember, amateurs built the ark, professionals built the Titanic...............The easiest thing to find is fault, don't be easy !.. --Anonymous--...</marquee> |
|
|
|
|
|
#10 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
ActiveSheet.DisplayAutomaticPageBreaks = False This speeds up the setup process... |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|