I have the following very weird scenario :
I have a template of an excel file and I create a duplicate of it (ctrl+c, ctrl+v).
I have another excel file, where a macro checks if some cells are empty in that duplicated file :
If ActiveCell.Offset(i - 1, 0) = "" Then
The cells are empty but this test will fail.
BUT :
If I open the duplicated file, go on the relevant spreadsheet (and not an other!), without no modification but just saving the file and closing it, I can then launch again the macro and it will work ! So the cell is empty, but it's like if Excel needs to initialize the spreadsheet first.
How can I avoid opening the file and saving it ? Because it can happen that another person will use the duplicated file, open it, change something on a different spreadsheet, save it, and close it. My macros must still result in saying that the cells are empty !
Do you have any idea what's going on ? Thank you in advance !