Trying to save an Excel file as a tab delimited in Excel 2016

Hi I’m trying to save an excel file as a tab delimited text file from Excel 2016.
Below is the script that I am using. I have tried a number of variations on this script but with no luck, I always get the error “Microsoft Excel got an error: Parameter error.” number -50
I am pretty new to Applescript and am trying to learn by examples I find on the internet.
By all accounts the script bellow should work but does not, Can any one tell me what I am doing wrong?

tell application "Microsoft Excel"
		set workbookName to (name of active workbook & ".txt")
	--save the current open workbook as a tab-delimited text file
	tell active workbook to save workbook as filename workbookName file format text Mac file format
	close active workbook saving no
end tell

Thank you very much

Model: iMac
AppleScript: 10.11.4
Browser: Firefox 61.0
Operating System: macOS 10.14

I don’t think you tell the workbook to save the workbook, I think you just tell Excel to save the workbook.

This thread may be useful: