View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
KobusD KobusD is offline
external usenet poster
 
Posts: 11
Default Sort a row of strings, some containing blanks

I am trying to sort a row, some cells contains strings and others
blanks. Range = "B18" to "AY18"
The "SORT" below does nothing! Can anyone see why?

---------
Private Sub Workbook_Open()

Dim OldRange As Range

Set OldRange = Worksheets("Variables").Range("FA_budget_lines")
OldRange.Sort 'Key1:=OldRange(1), Order1:=xlAscending, _ Header:=xlNo,
Orientation:=xlSortColumns

'some more code goes here...

End Sub