I'm about as frustrated as I've ever been with Excel, and I'm counting on some of the brilliant Ozgrid minds to resolve a really sticky problem.
I've written code for a part of an application I'm developing to copy the active worksheet, make a few changes to the new workbook, and saving it to a different path than the original workbook. Here's the line of code that's intended to save the new workbook:
Everytime I run it, I get a run-time error 1004 message that says "Microsoft Excel cannot access the file", followed by the path and filename. The filename is where the problem appears to be: ''C:\Users\Daryl\OneDrive\Insurance\Medical\Medicare\Claims\2015\Claim Summaries\1FDBE200'. As you can see, there are 8 alphanumeric characters (different each time) where the filename is supposed to be. When I step through the macro in the VBE Locals window, the filename displays correctly.
The code initially had references to formulas for the "2015" folder, and to three separate formulas making up the file name. I wrote it out letter-by-letter for testing purposes. I have now done an "Open and Repair" on the original file, and after confirming the problem occurred with other workbooks and file paths, both a "Quick" and "Online" repair of Office 2013 from Programs and Features. None of those has helped.
Any resolutions or even best guesses you'd care to offer will be greatly appreciated. Thanks