Selecting cells

G

Guest

Below is a snippet of code that finds the first empty column and pastes
information down the column. I want to select the newly pasted range for
editting. The last line does in fact select the proper range of cells after
pasting, but results in the following error message:

Run-time error "1004":
Method 'range' of object '_global' failed

Worksheets("Aggregates").Select
Range("A3").End(xlToRight).Offset(0, 1).Select
ActiveSheet.Paste
Range(ActiveCell.Address & ActiveCell.End(xlUp)).Select

Any help appreciated,
 
P

PCLIVE

Once you paste the content, the newly pasted range is already selected. So
you don't really need the last line.

HTH,
Paul
 
P

PCLIVE

Additionally, only if I change the code to reference Range("A1") instead of
A3, do I get the error you are stating. Otherwise, I don't get the error,
but the pasted range is not selected.
 
G

Guest

Jim - Thanks for the reply. Making your change resulted in only the first
cell in the column being selected. PCLIVE's answer was correct. The range of
cells I wanted to select was already selected when I pasted the information.
 
G

Guest

PCLIVE - Thanks for the help. You are correct. The range I was trying to
select was already selected from the Paste. Maybe why I was getting the error
message?Thanks for pointing that out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top