Sorting in VBA
Hi Michael
This is some code that I use in one of my projects, it does an alpha sort.
Shd = Sheets("Data")
Shd.Range("B5:AZ40").Sort Key1:=Shd.Range("B5"), Order1:=xlAscending
HTH
Andrew Bourke
Michael from Austin wrote:
I am doing serveral sorts in a macro. The code was recorded. When I run the
macro it always states that it can not determine which row in my list
contains column labels. I have to then click OK for it to assume that I want
the first row to be what it sorts by. It there a way around this?
|