View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Excel VBA - Type mismatch during While

If that works for you use it.

As I said, the previous code, as I changed it, worked fine for me.

--
Regards,
Tom Ogilvy

"sub_pop " wrote in message
...
What did work is this:

While ActiveCell = ActiveCell.Offset(0, -2)
On Error GoTo Sort
ActiveCell.Offset(0, -3).Select
ActiveCell.Copy
ActiveCell.Offset(0, 4).Select
ActiveCell.PasteSpecial
ActiveCell.Offset(1, -1).Select
Wend
Sort:
Columns("A:E").Select
Selection.Sort Key1:=Range("E1")

Is this a problem? Is there some reason it should not be used? Should I
move
Sort:
past End?

Thanks,
Marc


---
Message posted from http://www.ExcelForum.com/