PDA

View Full Version : Solved: Excel 2003/07 How can I get the value of the activecell from another sheet?



frank_m
10-05-2010, 01:32 PM
I am hoping to find a vba code method to get the value from the cell that is located in another sheet, but it needs to be the cell that was last activated in that sheet.

Thanks in advance.

Of course the code below is incorrect, but it shows what I am after.
Sheets("DESTINATION SHEET").Range("A2").Value = Sheets("SOURCE SHEET").ActiveCell.Value

mbarron
10-05-2010, 01:44 PM
You'll have to bounce to the sheet to grab the value.

Sheets("SOURCE SHEET").Activate
Sheets("DESTINATION SHEET").Range("A2").Value = ActiveCell.Value

frank_m
10-05-2010, 03:10 PM
That did the trick :thumb

Thanks mbarron (http://www.vbaexpress.com/forum/member.php?u=266)