+ Reply to Thread
Results 1 to 9 of 9

Excel will not paste clipboard material using VBA

  1. #1
    Registered User
    Join Date
    06-19-2013
    Location
    Chicago, United States of America
    MS-Off Ver
    Excel 2010
    Posts
    35

    Unhappy Excel will not paste clipboard material using VBA

    Hello,

    Currently, I have some code that takes data from a user selected excel workbook and imports it into a master data list (where the macro is run from)

    My code, listed below, does not allow me to paste the copied material into the cell I indicate. I have been searching the internet and attempting many different methods. I am hoping someone can assist me with my problem. The code that is highlighted in debugger mode is ActiveSheet.Paste (bolded below)

    Thank you in advance.

    Best regards,

    Grazian2


    Code

    Please Login or Register  to view this content.
    Last edited by grazian2; 07-18-2013 at 03:58 PM. Reason: Code Tags

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Excel will not paste clipboard material using VBA

    grazian,

    Please use code tags in your post.

    Click edit post, highlight your code, click # button in toolbar.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Excel will not paste clipboard material using VBA

    Try:

    Please Login or Register  to view this content.
    Instead of:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-19-2013
    Location
    Chicago, United States of America
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: Excel will not paste clipboard material using VBA

    XeRo,

    I will be sure to use code tags in the future, my apologies.

    Unfortunately, I am still receiving a runtime error 1004.

    If I manually copy and paste the information, it pastes perfectly fine into the cell.


    Thanks,

    Grazian2

  5. #5
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Excel will not paste clipboard material using VBA

    I haven't been able to test any of it because I don't have your Workbooks but why are you deleting the row you've just pasted?

    Please Login or Register  to view this content.

  6. #6
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Excel will not paste clipboard material using VBA

    In which module is your code saved?

  7. #7
    Registered User
    Join Date
    06-19-2013
    Location
    Chicago, United States of America
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: Excel will not paste clipboard material using VBA

    I am pasting approximately 300 rows into the new file. The top row in the copied material contains column titles, which are already include in the workbook the material is being pasted into. Thus, I delete them.

    My code is saved in Module2

    Thanks!

  8. #8
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel will not paste clipboard material using VBA

    you're copying entire columns which you can only therefore paste into row 1. replace
    Please Login or Register  to view this content.
    by
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  9. #9
    Registered User
    Join Date
    06-19-2013
    Location
    Chicago, United States of America
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: Excel will not paste clipboard material using VBA

    Joseph P,

    That worked great!

    Thank you very much for your assistance.

+ 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. Auto-paste from clipboard to excel workbook
    By sky123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-05-2011, 12:15 PM
  2. how do I paste formulas in excel clipboard?
    By AndyBermuda in forum Excel General
    Replies: 3
    Last Post: 05-27-2005, 11:05 AM
  3. [SOLVED] clipboard in Excel collects but will only paste most recent item
    By Gregory1558 in forum Excel General
    Replies: 1
    Last Post: 05-17-2005, 02:06 PM
  4. Paste range from Clipboard to Excel
    By Dariotto in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-07-2005, 01:06 PM
  5. Paste from clipboard to an Excel table
    By ChrisW in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-13-2005, 06:06 AM

Tags for this Thread

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