View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Application-Defined or Object-Defined Error on simple code

Myrna,

"." pesky little devils<g

Regards,
Jim Cone


"Myrna Larson" wrote in message ...
Sounds to me like Cost&Margin isn't the active sheet when the code runs. If
that's true, you have a missing period.

Change this line

Set SortRange = .Range(.Range("C1002"), Range("c1002").End(xlDown))

to

Set SortRange = .Range(.Range("C1002"), .Range("c1002").End(xlDown))

^