View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Janis Janis is offline
external usenet poster
 
Posts: 360
Default runtime 1004 error

It is an application or object defined error. The first line works but the
second one gives the error in my sort macro. I'm trying to use the count to
left for the columns because the users keep adding columns. Do I have a
missing parenthesis? It seems like both lines are the same.
Thanks,
Set Rng = .Range(.Cells(2, 1), _
..Cells(Rows.Count, .Cells(1, Columns.Count).End(xlToLeft)).End(xlUp))
'Set Rng = .Range(.Cells(2, 1), .Cells(Rows.Count, 26).End(xlUp))