I've been given a MS Access module written in London last year to cannibalise for its formatting functions and sub-procedures. Having spent the week analysing the code and mapping the new database to it, I'm now stuck on what seems to be a trivial error. Namely that Access cannot find a pre-created workbook on the local drive.
This is the line used in the code
XLapp.Workbooks.Open FileName:=CheckingFileLocation
and are both declared as a public variables.
The line produces Run-time error 1004 with the message:
'C:\AER 2006 Report Production\AER Trading.xls' could not be found. Check the spelling of the file name, and verify that the file location is correct.
I've been given administrator rights by my IT dept, unlocked the macro security in Excel, tried hard-coding the Excel spreadsheet location, changed the file location and shaken my fist at the screen, all to no avail. Can anybody help?
This is the line used in the code
XLapp.Workbooks.Open FileName:=CheckingFileLocation
- CheckingFileLocation = "C:\AER 2006 Report Production\AER Trading.xls"
- XLapp is declared 'As New excel.Application'
and are both declared as a public variables.
The line produces Run-time error 1004 with the message:
'C:\AER 2006 Report Production\AER Trading.xls' could not be found. Check the spelling of the file name, and verify that the file location is correct.
I've been given administrator rights by my IT dept, unlocked the macro security in Excel, tried hard-coding the Excel spreadsheet location, changed the file location and shaken my fist at the screen, all to no avail. Can anybody help?
