I have a program that downloads a CSV file from the web, sorts the data, and then saves it. Later in the program this file is called and the data is read using a "Do until end of file" command.
All works well for most users, but two have reported that the program causes them to get caught in a loop.
I have discovered the problem to be a cell after the last row of data (ie- if the data ends in row100, then cell(A101) appears to be empty but it's not... maybe there's a blank space in it?). Therefore, since the program 'thinks' that A101 isn't empty, it attempts to read it, but since there's no value the program gets caught in a loop. If i delete the cell after the last row of data (A101 in this instance) the program will then be able to read this file fine.
I know it would be easy to just have the program delete this cell, but the number of rows is not constant and i don't want to just delete the last row since that would eliminate the last row of data for users that are not encountering this problem.
Any suggestions for a 'fix' or is it possible that there is a setting on the computers of these two users that is causing the last cell to save with something non-visible in it?
Thank you.
All works well for most users, but two have reported that the program causes them to get caught in a loop.
I have discovered the problem to be a cell after the last row of data (ie- if the data ends in row100, then cell(A101) appears to be empty but it's not... maybe there's a blank space in it?). Therefore, since the program 'thinks' that A101 isn't empty, it attempts to read it, but since there's no value the program gets caught in a loop. If i delete the cell after the last row of data (A101 in this instance) the program will then be able to read this file fine.
I know it would be easy to just have the program delete this cell, but the number of rows is not constant and i don't want to just delete the last row since that would eliminate the last row of data for users that are not encountering this problem.
Any suggestions for a 'fix' or is it possible that there is a setting on the computers of these two users that is causing the last cell to save with something non-visible in it?
Thank you.