I have tried to use the following code to copy a given range and paste it into a new workbook which I will then file with a new name.
Sub OutputText(SheetName, RangeName, SaveName, FilePath, FileType)
Dim wbSource As Workbook
Dim wsSource As Worksheet
Dim wbDest As Workbook
Dim fName As String

'References
Set wbSource = ThisWorkbook
Set wsSource = Sheets(SheetName)
Set wbDest = Workbooks.Add

'Copy range on original sheet
10 wbSource.Range(RangeName).Copy
I get an error message "object does not support the named Property or method at line marked 10. In most cases when I have got this error it has been caused by a typo. On this occasion though Rangename is right and the range does exist in wbSource in wsSource. Where else could I have gone wrong?