+ Reply to Thread
Results 1 to 10 of 10

Copying from one sheet to another error

  1. #1
    Registered User
    Join Date
    03-12-2015
    Location
    Denver
    MS-Off Ver
    2010
    Posts
    8

    Copying from one sheet to another error

    I am really struggling to get the attached code to run. I am quite inexperienced at VBA but could really use some pointers on this. I would also really like to add to this code the ability to overwrite the sheet if it already exists in the workbook but have been unable to get that to work either.

    Thank you all for your consideration

    I keep getting this error Capture.JPG

    Please Login or Register  to view this content.
    Last edited by soulspike; 08-27-2015 at 01:16 PM.

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Copying from one sheet to another error

    This may not resolve your current issue, but I did notice that you haven't declared what impList is but it is used in the 1st If/Then code.....Ex. Dim impList as ?
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Registered User
    Join Date
    03-12-2015
    Location
    Denver
    MS-Off Ver
    2010
    Posts
    8

    Re: Copying from one sheet to another error

    I updated the code above and removed the superfluous code. I also colored the line that I error out on on.
    thanks

  4. #4
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Copying from one sheet to another error

    Try
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-12-2015
    Location
    Denver
    MS-Off Ver
    2010
    Posts
    8

    Re: Copying from one sheet to another error

    I tried that and continue to get the same error, I am sure i am missing something small.

  6. #6
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Copying from one sheet to another error

    That makes 2 of us because I cant figure out why it is giving that error either.

  7. #7
    Registered User
    Join Date
    03-12-2015
    Location
    Denver
    MS-Off Ver
    2010
    Posts
    8

    Re: Copying from one sheet to another error

    Ok I think I have figured it out. I am running these from a ribbon and I have other code working but nothing that copies sheets. When I open excel with a .xlsx extension it doesn't work, but .xlsm does. So it has to be the permissions, I guess i need to figure out how to make the code in my ribbon trusted to allow it to run outside of an .xlsm.

  8. #8
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Copying from one sheet to another error

    I think, in order to run macros, it has to be the .xlsm extension.

  9. #9
    Registered User
    Join Date
    03-12-2015
    Location
    Denver
    MS-Off Ver
    2010
    Posts
    8

    Re: Copying from one sheet to another error

    Well i have other macros that are formatting and calculating inside of its own workbook.
    They work just fine in any .xlsx file. The copy code works fine up to the point where i try to copy from the other book.
    In fact it opens the first book in the list but just fails the copy method.

  10. #10
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Copying from one sheet to another error

    As I said. "I think....." I'm pretty inexperienced with VBA as well, so sometimes what I say is completely wrong

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. #REF Error When Copying A Sheet In A Sum Range
    By centerNegative in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-02-2013, 11:21 PM
  2. [SOLVED] Copying one sheet to another Error
    By johnph in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-03-2012, 08:59 AM
  3. [SOLVED] VBA copying columns from one sheet to another - error / help
    By Traviscon in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-18-2012, 02:09 PM
  4. Name definition error when copying sheet
    By racton in forum Excel General
    Replies: 2
    Last Post: 10-14-2011, 06:25 PM
  5. Rounding error when copying value from one sheet to another
    By xned in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-28-2010, 03:29 AM
  6. Error copying sheet which contains macros to a new book.
    By fredblogs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-10-2009, 09:33 AM
  7. When copying sheet I get this error
    By JK1234 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-06-2009, 10:10 AM
  8. Copying Sheet - subscript out of range error
    By GSP@DCS in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-01-2006, 09:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1