Add the debug.print line just before the docmd.transferspreadsheet line. You can use ? varName in the IW but you'd need to add a break point on the docmd.transferspreadsheet line.