+ Reply to Thread
Results 1 to 6 of 6

pasting problem

  1. #1
    Registered User
    Join Date
    06-18-2009
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2003
    Posts
    18

    pasting problem

    I have a command button that I want to automatically copy and paste certain data to another worksheet when clicked. I keep getting a "runtime error 1004; application-defined or object-defined error". The code I have so far is:

    Please Login or Register  to view this content.
    The line in bold, "Range("C36").Select" when I try and select the area to paste it, is where I am getting the error message. Any help is appreciated.
    Last edited by shak1; 07-02-2009 at 09:53 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: pasting problem

    Perhaps:

    Please Login or Register  to view this content.
    or possibly

    Please Login or Register  to view this content.
    Last edited by DonkeyOte; 07-02-2009 at 05:09 AM.

  3. #3
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: pasting problem

    Would this single line help you

    Please Login or Register  to view this content.
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  4. #4
    Registered User
    Join Date
    06-18-2009
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: pasting problem

    Thank you rwgrietveld that actually works (almost) perfect, ideally I would want it to 'Paste Special' 'Values only' so that it fits into the layout. Is there any way to do this with the line you just provided in your previous post?

    Thanks,

    Shak

  5. #5
    Registered User
    Join Date
    06-18-2009
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: pasting problem

    Figured it out. Thanks very much DonkeyOte and rwgrietveld, much appreciated.

  6. #6
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Re: pasting problem

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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