View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Problem coding a Sort

icol = 7
dataRange.Sort Key1:=worksheets("Source").Cells(5,icol)

--
Regards,
Tom Ogilvy


"Peter Chatterton" wrote in message
. ..
How do I code this so as to use an Integer containing 7 for the column?
dataRange.Sort Key1:=Range("G5")

(Set dataRange = ActiveWorkbook.Sheets("source"). _
( Range(Cells(iStartDataRow, 1), _
( Cells(iMaxRowNumb, iMaxColNumb))

Thanks,
Peter.