I have an excel file with number of macros, which I run for different purposes. Previously it was running fine but recently (a week or so) I am facing the issue that it crashes every second time I run a macro. I have over 10 functions in it. So whatever I execute the first time will work but whenever I run it second time it will crash and gives a catastrophic error. I can go with any combination that i run Function 8 first and function 6 second time or function 5 first and function 8 second time, it will crash on second function. Closing and reopening the excel file will solve the problem for one time.
All functions are reading data from another CSV file and do some calculations and this reading of file is done using ADODB connection so that CSV file can be used as a DB and if there is any issue in the data of CSV it is properly taken care of, using other methods for reading CSV sometimes does break with special characters or extra comma. The line giving error is shown below.
Now the interesting thing is that I took the file on my laptop and ran it and it did not give this catastrophic error on running the second function. Both machines are running windows 7 with excel 2016.
The machine on which I am having the issue is on the domain and was recently patched and updated. Also i don't have administrative privileges on it.
All suggestions will be appreciated.
All functions are reading data from another CSV file and do some calculations and this reading of file is done using ADODB connection so that CSV file can be used as a DB and if there is any issue in the data of CSV it is properly taken care of, using other methods for reading CSV sometimes does break with special characters or extra comma. The line giving error is shown below.
VBA Code:
DbConnect.Open "Driver=Microsoft Access Text Driver (*.txt, *.csv);DefaultDir=" & myFilePath & "; " & "Extensions=csv,txt;"
Now the interesting thing is that I took the file on my laptop and ran it and it did not give this catastrophic error on running the second function. Both machines are running windows 7 with excel 2016.
The machine on which I am having the issue is on the domain and was recently patched and updated. Also i don't have administrative privileges on it.
All suggestions will be appreciated.