I want to select the formatted range of an Excel sheet. To define the last and first row I use the following functions:
lastColumn = ActiveSheet.UsedRange.Co
You're missing a close parenthesis, I.E. you aren't closing Range().
Try this Range(cells(1, 1), cells(lastRow, lastColumn)).Select
But you should really look at the other answer from Dick Kusleika for possible alternatives that may serve you better. Specifically, ActiveSheet.UsedRange.Select which has the same end result as your code.