I\'m new to python and trying to convert some old vb code into a new python script. The code below returns a value that is used in another part of the program but when using