Thanks for this code.
As it is an function you call may you can Show us the calling code?
I assume it is caused by the way you call this function.
Have you set global variables for objSheet and objSess?
Got the get set once by your main code or each time again?