+ Reply to Thread
Results 1 to 7 of 7

selective copy and paste via command button vba

  1. #1
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    selective copy and paste via command button vba

    Hi all,
    I am trying to achieve selective copy & paste via command button.

    I want to select any cell in column D
    e.g. D7

    Then I press command button
    which will copy relative cell from column J i.e. Cell J7
    and paste value in D7

    So which ever cell I select in D column that cell will get updated from its relative counterpart from column J when i press command button.
    I need help. Basic starting code has been generated but is not ok yet. Sample is attached
    Many thanks
    Kind regards


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    03-19-2014
    Location
    India
    MS-Off Ver
    Excel & VBA - 2007 & 2010
    Posts
    60

    Re: selective copy and paste via command button vba

    Hi,

    Please find the changes done in the attachment.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  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: selective copy and paste via command button vba

    Why do you need to loop? All you need is that single cell copied every time you hit the button?

    No reason to copy if you only need the values.

    Please Login or Register  to view this content.
    Last edited by Solus Rankin; 03-27-2014 at 05:06 PM.
    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."

  4. #4
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: selective copy and paste via command button vba

    Hi Moinsk,
    Thanks for prompt reply. Its a perfect solution.
    Great work. Thanks. I have clicked * to thank you.
    kind regards

  5. #5
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: selective copy and paste via command button vba

    Hi Solus Rankin,
    I agree with you. Your solution is very interesting one and works great.
    Thanks for a prompt reply & great work
    I have clicked * to thank you
    Kind regards

  6. #6
    Registered User
    Join Date
    03-19-2014
    Location
    India
    MS-Off Ver
    Excel & VBA - 2007 & 2010
    Posts
    60

    Re: selective copy and paste via command button vba

    Thank You KK1234

  7. #7
    Registered User
    Join Date
    08-10-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: selective copy and paste via command button vba

    Hi,

    Im amazed by the solution! Thank you!

    Was wondering how i can copy a whole column rather than a specific cell?

    Any suggestions please?

    Thank you!!!!

+ 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. Copy and Paste as Values using Command Button
    By macky1730 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-04-2013, 02:18 AM
  2. [SOLVED] Simple Copy and Paste Command Button
    By j_gideon in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-25-2013, 02:38 PM
  3. [SOLVED] Problems with copy and paste working with a command button.
    By Spreadlover in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-14-2013, 05:58 AM
  4. Command button to add rows, copy and paste formulas, and format.
    By seankuus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-05-2013, 08:37 PM
  5. copy and paste data from one worksheet cell to another using command button
    By jasonruiz in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-13-2011, 04:34 AM

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