I'm getting error 1004 when I try to apply the following code to sort a range, I've tried several different ways of defining the range (which I need to do using variables) but it keeps failing on the .Apply line of code:
Sheets(SheetName).Select
SheetRecordCount =...