James_Latimer
Active Member
- Joined
- Jan 20, 2009
- Messages
- 415
Excel 2010
Hello,
I'm hoping someone can give me a little assistance please.....
I have an xlsm file which seemed to be working fine. I have since recorded a macro for sorting columns descendingly and amended the code putting it into the activate code of one of the sheets.
The code is.....
The issue i have now is that whenever i type into a cell and hit return i am getting a message "User-defined type not defined". I'm not sure why. I've had a look at other posts and it all seems to be down to references (i cant see any that are missing or unchecked that should be - dont quote me on that!!).
This works fine in excel 2007 though.
If anyone can point me in the right direction it would be much appreciated.
Hello,
I'm hoping someone can give me a little assistance please.....
I have an xlsm file which seemed to be working fine. I have since recorded a macro for sorting columns descendingly and amended the code putting it into the activate code of one of the sheets.
The code is.....
Code:
Private Sub Worksheet_Activate()
Sheets("D2").Sort.SortFields.Clear
Sheets("D2").Sort.SortFields.Add Key:=Range("E6:E8"), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With Sheets("D2").Sort
.SetRange Range("B6:E8")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
The issue i have now is that whenever i type into a cell and hit return i am getting a message "User-defined type not defined". I'm not sure why. I've had a look at other posts and it all seems to be down to references (i cant see any that are missing or unchecked that should be - dont quote me on that!!).
This works fine in excel 2007 though.
If anyone can point me in the right direction it would be much appreciated.