I have recently developed a module for a client which begins by opening a file containing lookup data in order to cycle through staff members stored in a list. I tested it thoroughly before sending it out, obviously, and we are both using Office 2010. When my client ran the code, however, he got an error message saying that this file "... could not be found. Check the spelling of the file name, and verify that the location is correct.
"My code contained this line:
Code:
Workbooks.Open (strPath & "\XYZ Lookups")
After checking that the file name and location were correct, I suddenly realised that I had simply forgotten to include the file extension. I added ".xlsx" to the code and all was fine: everything worked perfectly and the client very happy.
My question, though, is WHY DID IT EVER WORK ON MY MACHINE?!!!