Save Excel File in Select Path

I am having trouble in saving an open Excel WorkBook. From the Scrip below it keeps saving the file to the second folder “1 Test” not “TestSave”, The routine opens to the correct Finder Window but saves it in the one before.


--To set the folder path have to step though each Folder to Home
tell application "Finder" to set the target of the front Finder window to folder  "TestSave" of folder "1 Test" of folder "DropBox" of home
tell application "Finder"
	set currentDir to target of Finder window 1 as alias
end tell
tell application "Microsoft Excel"
	activate
	save active workbook in currentDir	
end tell

This is the output after running the routine.The window that is open is “TestSave” but the file has been saved in the previous folder “1 Test”

Thanks Peter

From the AppleScript Dictionary of “Excel” you can see that the destination path for the workbook always should be a file, not a folder. And some other mistakes in the script above. Working script:


tell application "Finder"
	set currentDir to ((path to home folder) as text) & "Dropbox:1 Test:TestSave:"
end tell
tell application "Microsoft Excel"
	save workbook as active workbook filename currentDir & "myNewWorkBook3.xlsx"
end tell

My apologies for the delay in acknowledging your message I am traveling and will be for a while until I have chance to try your solution, however your help is greatly appreciated . think I should remember such basic things as checking the directory must admit memory not what it used to be, when I was wiring IBM plug boards.