Thread: Activate Cells
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Activate Cells

try
Sub copylastcell()
Sheets("mysheet").Range("a2").End(xlDown). _
End(xlToRight).Copy ActiveCell

End Sub

--
Don Guillett
SalesAid Software

"Gabe" wrote in message
...
Hello,

I am trying to use the following code but for some reason it isn't
working?
Can you all try it and maybe tell me what I am doing wrong? Everything
works
up until it is supposed to select the cells to the right. As you would if
you
were to use Ctrl+Shift+Right Arrow keys. Once it goes down, how do you
make
the current cell that it selects active?

Sub Macro1()
Sheets("Sheet1").Select
Range("A2").Activate
'
Application.SendKeys "{DOWN}"
'
Range(Selection, Selection.End(xlToRight)).Copy
End Sub