OK, you could use ListObjectContents in your function codeword without parameters like this:
ListObjectContents (box)
but then you can use the codeword function only with this box. If you want to use the codeword function with an additional object, too, you must pass the object to this function.
codeword(this)
calls the function and uses the active object as parameter.
But if you don't need this function for other objects, you can remove the parameter