Resize issue

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

HI everybody,

What is wrong with

export.Sheets("Sheet1").Range("C4").Resize(Range("F4").End(xlDown).Row,
4).Select

Thanks

because

export.Activate
Range("C4").Resize(Range("F4").End(xlDown).Row, 4).Select
Selection.Copy
AllJobVolumes.Activate

works?!
 
If the other works then no selections necessary

export.Sheets("Sheet1").Range("C4").Resize(Range("F4").End(xlDown).Row,4).COPY
 
maybe sheet1 is not the active sheet. no need to select, anyway, you're better
off without it.
 
Is F4 you're using on the same sheet as C4?

export.Sheets("Sheet1").Range("C4") _
.Resize(export.Sheets("Sheet1").Range("F4").End(xlDown).Row, 4).Select

And the export workbook has to be active
and sheets("sheet1") has to be active/selected

or

with export.sheets("sheet1")
application.goto .range("C4").resize(.range("F4").end(xldown).row, 4), _
scroll:=true 'or false
end with

And you don't have to worry about what workbook and what worksheet is active.

The "with" statement makes it less stuff to type -- and easier to understand for
me.
 

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