how to select cells from a non active worksheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to select all the cells from column 'A' of the non-active worksheet
 
You can only select on an active worksheet. That being said in the world of
macro land you do not need to select cells to reference them. In fact if you
can you're best off not to select cells as that is extra overhead that is not
necessary. Post what you want to accomplish and we can (hopefully) help you
get around the whole selection thing...
 
I don't think that this is possible. What is your objective?

Faisal...
 
If the non-active sheet is in the active workbook you can use.....

Sheets("Sheet1").Columns("A:A").Select

If it is in another workbook then use....

Workbooks("NonActive.xls").Sheets("Sheet1").Columns("A:A").Select
 
the short answer is, you can't.
however, you don't have to select a cell, a worksheet, a workbook, or
any other object in order to manipulate it.

to use select, first you'd have to activate worksheet B (for
instance), and then re-select worksheet A after you've done whatever
you want to do in worksheet B.

it's a different concept alltogether to identify the worksheets and
then work with them without actually selecting them.

for instance (just quickie code) the way you're doing it:
(starting in Worksheet A)
worksheetB.select
range("a1").select
selection.copy
worksheetA.select
range("a1").select
selection.paste

OR

(after declaring all the variables)
worksheetA.range("a1").value = worksheetB.range("a1").value

hope it helps
susan
 
Forget my last reply, you cannot 'select' but can reference them. Or
activate the sheet then select them.
 

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

Back
Top