Hi I'm trying to run a sort using the following code
[code]
With xlWBTemp.Worksheets(1).Sort
.SetRange xlWBTemp.Worksheets(1).Range("A1:" & xlWBTemp.Worksheets(1).UsedRange.Columns.Count & xlWBTemp.Worksheets(1).UsedRange.Rows.Count)
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
[\code]
It errors when i try to run it, at a guess because the column returns a number instead of a letter, can anyone tell me the right way of doing this
cheers
Keith