I have written some code, learned from generous people on this site, to export data to specific cells in an existing excel workbook The problem I now face is that the user will have to insert the path to the excel file-I would like to just instruct them to store the xls file in the same place that they stored the mdb file. I did get a form with some code that allows the user to select the file and find the path, but it doesn't work consistently in a2007 and not what I need anyway. The code below works.
Set oWB = oXL.Workbooks.Open("C:\Users\GG\Documents\TestingM isc\FileName.xls")
I can't seem to find a way substitute CurrentProject.Path & "\" & FileName.xls for the actual path-I assume that I am not using quotes properly, but have given up on trying combinations. Can someone tell me how to do it?
I am using A2007 in W7 64 bit computer.