Dim just defines it and sets it's initial value to zero. You need to assign a value to it, perhaps from the puzzle array ?