Sorry for the poorly worded subject line, I'm not sure how to succinctly word this problem. I have a VBA macro that I pieced together* a couple of years ago to help with a pretty simple task. We have two excel sheets that pull in information daily from different sources. The macro copies and paste values for the worksheet, then 1) saves a copy of the values only worksheet with the current date, 2) resaves the values only worksheet as a .csv file that is then manually uploaded into our database.
The code for one macro is below (the two macros are almost identical, with the exception of saving as different file names):
As of two days ago, both versions have started having problems. Everything works perfectly up to the saving as a CSV file. The CSV gets saved, but some content is blanked out (all but one cell of column A, and every cell in column B and C that should have data instead are showing #N/A or #Value). But the .xls file, that is being saved first, has the correct values only data. The other sheets macro has a similar problem, but the csv file is just completely blank.
I've double checked that nothing in the macro has changed since I first put it together. The only thing I can think of that has changed is that a couple of days before the problem appeared we changed the user that is logged in when the macro is run...but it worked fine for this user for 2 days after the change.
Any other ideas of what could be causing this strange behavior? I've rebooted the machine, but after that I don't really even know where to start.
Thanks,
Dylan
*I pieced this together using the recorder and snippets of code found on the web, my level of experience with VBA is pretty close to zero.
Bookmarks