Excel Error 1004 Copy Method Of Worksheet Class Failed
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have copy method of worksheet class failed excel 2010 Meta Discuss the workings and policies of this site About Us copy method of worksheet class failed vba Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with run time error 1004 excel 2010 us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just
Run Time Error 1004 Vba
like you, helping each other. Join them; it only takes a minute: Sign up Excel Vba Copy Method of Worksheet fails up vote 1 down vote favorite I am trying to copy an excel sheet from one workbook to another without the user seeing anything but I keep getting the error 'Copy Method of Worksheet Class run time error 1004 excel 2013 failed'. It seems you cant copy one sheet to another workbook unless the workbook is visible? Thanks for any help. Hers is the code that fails: Private Sub CommandButton1_Click() Dim xlapp As Excel.Application Dim wkBook As Excel.Workbook 'Connect to Excel Set xlapp = New Excel.Application 'Set workbook and open workbook in directory Set wkBook = xlapp.Workbooks.Open(sFileName, xlUpdateLinksNever, ReadOnly:=False) ThisWorkbook.Sheets("Logistics").Copy Before:=wkBook.Sheets(1) wkBook.Close True xlapp.Quit Set xlapp = Nothing End Sub excel excel-vba share|improve this question edited Mar 26 '15 at 13:09 user2140173 asked Feb 17 '12 at 11:41 JC75 341412 This isn't your issue. You are creating a separate Excel instance that can't "talk" to your current instance that contains your code. –brettdj Feb 17 '12 at 12:02 add a comment| 4 Answers 4 active oldest votes up vote 2 down vote accepted But I dont want the user to see the workbook opening and closing? Is there any way to copy from one workbook to another without the user seeing the workbook that is bein
Forums Excel Questions Run time Error 1004: Copy method of Worksheet Class failed Results 1 to 5 of 5 Run time Error run time error 1004 excel 2007 1004: Copy method of Worksheet Class failedThis is a discussion on
Run Time Error 1004 Method Range Of Object _global Failed
Run time Error 1004: Copy method of Worksheet Class failed within the Excel Questions forums, part of the
Microsoft Visual Basic Runtime Error 1004 Excel 2013
Question Forums category; I keep getting this error when creating a number of copies of a worksheet. I have tried: turning off the ... LinkBack LinkBack URL About LinkBacks http://stackoverflow.com/questions/9327613/excel-vba-copy-method-of-worksheet-fails Bookmark & Share Digg this Thread!Add Thread to del.icio.usBookmark in TechnoratiTweet this thread Thread Tools Show Printable Version Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Apr 12th, 2002,01:44 AM #1 TREY New Member Join Date Apr 2002 Posts 3 I keep getting this error when creating a number of copies of a worksheet. http://www.mrexcel.com/forum/excel-questions/4817-run-time-error-1004-copy-method-worksheet-class-failed.html I have tried: turning off the AutoCalculation, Copying a less complex worksheet, Insterting Do events - And have had now success. I was wondering would inserting a timer to slow down the copying help. Any help would be appreciated. Share Share this post on Digg Del.icio.us Technorati Twitter Reply With Quote Apr 12th, 2002,01:51 AM #2 Ivan F Moala MrExcel MVP Join Date Feb 2002 Location Auckland, New Zealand Posts 4,209 On 2002-04-12 01:44, TREY wrote: I keep getting this error when creating a number of copies of a worksheet. I have tried: turning off the AutoCalculation, Copying a less complex worksheet, Insterting Do events - And have had now success. I was wondering would inserting a timer to slow down the copying help. Any help would be appreciated. Hi Trey Just a couple of Q's 1) What version of Excel 2) How are you calling the routine eg commandbutton, 3) What code are you using Share Share this post on Digg Del.icio.us Technorati Twitter Kind Regards, Ivan F Moala From th
Forum Microsoft Office Application Help - Excel Help forum Excel Programming / VBA / Macros Run Time Error 1004 Copy method of Worksheet class failed To get replies by our experts at nominal charges, follow http://www.excelforum.com/showthread.php?t=368222 this link to buy points and post your thread in our Commercial Services forum! Here is the FAQ for this forum. + Reply to Thread Results 1 to 3 of 3 Run Time Error 1004 Copy method of Worksheet class failed Thread Tools Show Printable Version Subscribe to this Thread… Mark this thread as solved… Rate This Thread Current Rating Excellent Good Average error 1004 Bad Terrible Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 05-04-2005,03:06 PM #1 Paul Hitchcock Guest Run Time Error 1004 Copy method of Worksheet class failed I have a button on a worksheet that runs the CopySheet Macro: Sub CopySheet() ActiveSheet.Copy after:=Sheets(ActiveSheet.Index) End Sub It works fine for the first 25-30 times I use it, then it starts giving me the following error: Run-time time error 1004 error '1004' Copy method of Worksheet class failed When I shutdown and restart excel, it works again for 25-30 times. Does anybody know why this would stop working? Register To Reply 05-04-2005,04:06 PM #2 Ron de Bruin Guest Re: Run Time Error 1004 Copy method of Worksheet class failed Hi Paul See this Kb for a workaround http://support.microsoft.com/default...84&Product=xlw -- Regards Ron de Bruin http://www.rondebruin.nl "Paul Hitchcock"