Thanks Jeff the attachment worked great, and it helped me get my head round the concept.
I'm now tring to work out how to update the scrollbar if the content is changed so that the size of the scrolbar reflects where abouts in the document you are viewing. I have manged to do this with a first .txt file but as soon as I change the content, by using a button, the scrollbar stays the same. I have only just started trying to do this so might be able to work it out.
Thanks for your time
Mark