Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

using windows clipboard for copying and pasting.

using windows clipboard for copying and pasting.

using windows clipboard for copying and pasting.


In VBA for Excel is it possible to mark a range, copy the values of the range to the clipboard and paste the contents again in another sheet of the same workbook. please help. I am thinking of alternatively storing the values of the range in an array and then copying the contents of the array back in another cell. thanx.


RE: using windows clipboard for copying and pasting.

There's no need to use the clipboard. Excel already knows how to copy and paste. The VBA code below copies from the currently active sheet range A1-A6 to Sheet2 Range A1-A6. I recorded this macro in excel after reading your post. The code does exactly what i wanted it to without me writing a single line of code. The moral of the story here is that if you know how to do something with your mouse and keyboard in excel, then you know how to write the vba code for it. Just choose record macro off the tools menu and go through the process using your mouse and keyboard. In many cases you will need to tweak the macro after it's recorded, but much of the work is still done for you.  



Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?  
For innovative, low cost solutions check out my website.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close