ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,226
- Office Version
- 2007
- Platform
- Windows
Hi,
I have this code shown below.
Its supposed to sort the data list using column D
When i use the command button nothing happens / changes/
I dont even get an error message.
Do you see ?
Thanks
I have this code shown below.
Its supposed to sort the data list using column D
When i use the command button nothing happens / changes/
I dont even get an error message.
Do you see ?
Thanks
VBA Code:
Private Sub SortListA_Z_Click()
Dim x As Long
Application.ScreenUpdating = False
With Sheets("KEY CODE LIST")
If .AutoFilterMode Then .AutoFilterMode = False
x = .Cells(.Rows.Count, 1).End(xlUp).Row
.Range("D2:F" & x).Sort Key1:=Range("D2"), Order1:=xlAscending, Header:=xlGuess
End With
ActiveWorkbook.Save
Application.ScreenUpdating = True
Sheets("KEY CODE LIST").Range("A1").Select
End Sub