xlUp is just a comment for the equivalent constant, you can use it instead of -4162.
I mentioned in the previous question, that the error might be due to you not defining xlWs, which is just a placeholder for the worksheet you're doing this on. You can replace xlWs with Sheet1 or Activesheet or Worksheets("YourSheetName Here"), etc.