Interesting occurrence today and I cannot figure out why, thus I am here.
I have a simple macro to save a file to a certain location with the current date - 1 as part of the name. The macro works when my file starts out as an xlsx type, but if I start a new file as binary (my default file type), dump in all my data and run the macro, it gives me a 1004 run time error and says the file type is not valid.
Here is the line from the code that is giving me problems:
Any ideas as to why this would work when my file starts as an xlsx and not when it is already an xlsb?
I have a simple macro to save a file to a certain location with the current date - 1 as part of the name. The macro works when my file starts out as an xlsx type, but if I start a new file as binary (my default file type), dump in all my data and run the macro, it gives me a 1004 run time error and says the file type is not valid.
Here is the line from the code that is giving me problems:
Code:
"S:\folder\folder2\folder3\2016-08 Aug\filename " & Format(Now() - 1, "MMDD") & ".XLSB"
Any ideas as to why this would work when my file starts as an xlsx and not when it is already an xlsb?