Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Excel select command

Status
Not open for further replies.

eAlchemist

Technical User
Aug 28, 2003
64
0
0
US

Can someone tell me why this line of code comes back with a Run-time error 1004 when I run it? It doesn't error out when I run it in the immediate window

Code:
Sheets("Sales Index").Range(Cells(3, 56), Cells(Sheets("SalesIndex").Range("A2").SpecialCells(xlLastCell).Row, 107)).Select
 
Your sheet is named "Sales Index" or "SalesIndex" ?
Try to always qualify the Cells property.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
That was a mistake in my copying it. It's correct as "Sales Index" in both places.

Thanks,
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top