Sorting troubles

J

Jeff Ewert

Hello,

I'm trying to run this section of my code:

Workbooks("Master Spreadsheet vs Database Macro.xls"). _
Sheets("Results").range(Cells(7, 1), Cells(50, 9)).Sort _
Key1:=Workbooks("Master Spreadsheet vs Database Macro.xls"). _
Sheets("Results").Columns("E"), Order1:=xlAscending

and I get this error:

Run-time error '1004';
Application-defined or object-defined error

I know the problem has something to do with using the range

(Cells(7, 1), Cells(50, 9))

, because it works if I use the range

("a7:i50")

instead. Shouldn't both ranges work?

Thanks in advance,

Jeff
 

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