View Single Post
 
Old 06-30-2019, 10:35 PM
Learner7 Learner7 is offline Windows XP Office 2007
Advanced Beginner
 
Join Date: May 2010
Posts: 51
Learner7 is on a distinguished road
Default

Quote:
Originally Posted by NoSparks View Post
Can you be a little more specific ?

Any time you click into, tab into or hit the enter key, the cell you go into becomes the selected cell, there are over 17 billion cells on each worksheet. How would VBA know which one(s) you want this copy to happen with, and how would VBA know what cell on which other sheet you want to paste to ?
Thanks. How can I modify the below code to make sure that it only copies the CELL that I selected on Sheet1 but not the range of cells as in the code?

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Not Intersect(Target, Range("A1:A9")) Is Nothing Then
        Target.Copy
    End If
End Sub
I want the selected cell to be copied to the Clip Board. Please do help.

Note: It is working fine. My problem is resolved.
Reply With Quote