Thanks everyone for you replies. I decided to install a 64 bit version on my laptop so I was able to change and test the code and it all works.