Thread: Help with code:
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
pinmaster pinmaster is offline
external usenet poster
 
Posts: 347
Default Help with code:

Hi, does anyone know why this would cause an error?

ActiveWorkbook.Sheets("1st div").Select
Range("B5:B54").Select
Selection.Sort Key1:=Range("B5"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

error - Select method of range class failed

TIA
Jean-Guy