Sep-14-2019, 11:04 PM
Thanks to those who replied. The example I posted was too simplified. The actual program is more complicated and uses a command in a gui button to run the function. I think that is where my problem is. I can get the result I want if I return the global variable in the function when using a normal function call. Rather than take up more of your time, I will try to rewrite using a conventional function call.