Quote:
when i debug the code the string filelocation return null.
So use the debugger and find out why.
It gets filled from a cell, so start there. Look at the row, look at the cell, check the Rowindex value. IT unlikely to be actually
null
, since Text properties don't normally return those, they return the empty string which is different.
We can't do any of that for you, we have no access to your code while it is running, or to you data. And you need both of those to work out what is going on.