Okay, first off. I TOLD you NOT TO MODIFY THE FUNCTION you got from my website AT ALL. Do NOT CHANGE ANYTHING. Just copy and paste it into a standard module.
You then CALL the function like this from a DIFFERENT EVENT or macro:
Call SendTQ2XLWbSheet("Jack Powell Completions", "Completions", "O:\Public\Public Users Folders\Jack Powell\Jack Powell Target Sheet 2011.xlsm")
Again DO NOT MESS WITH THE FUNCTION AT ALL. It is a generic function written to handle anything you throw at it, but you must CALL the function and PASS the parameters, you do not modify the function.
Bob Larson, Former Access MVP (2008-2010) http://www.btabdevelopment.com (free Access tools, tutorials, and samples)