Hi everyone,
I've had this code working last time on November 2021. Then I tried to run it on January 2022 and it raised me next error line "Runtime error '76' path not found". I've verified that folder where I want to save file exists, there are no "Read-only" conditions, I'm administrator and logged with administrator account.
There is strange manual solution for this as i figured out.
Here is part of code that produces error:
An "Set a = .." line is highlighet when I use debug.
SaveLocation is string with value "C:\Users\User\Desktop\Otpremnice\2022\Sijecanj\O1-xxx\" (and that folder structure is created with MkDir (if year doesnt exists create folder, etc..))
Manual solution is: if I edit Savelocation in immediate window from "C:\Users\User\Desktop\Otpremnice\2022\Sijecanj\O1-xxx\" to "C:\Users\User\Desktop\Otpremnice\2022\Sijecanj\O1-xxx" (removed backslash) and add backslash to "\PONUDA.txt", press F5 code executes.
On the next execution of code same error raises. So if i edit again SaveLocation from "C:\Users\User\Desktop\Otpremnice\2022\Sijecanj\O1-xxx" to "C:\Users\User\Desktop\Otpremnice\2022\Sijecanj\O1-xxx\" (added backslash) and remove backslash from "PONUDA.txt", press F5 code executes.
Since code worked before, i assume that some windows update broke excel file creation. I've gone over stackoverflow, googled everything and still there is no help. Tried to save directly to C:\ , to Desktop still nothing.
If additional info is needed feel free to ask.
Bookmarks