i copy and pasted from another place so i don't know how or why it looks the way it does...
while count1 <= len1 is a classical 'off by one' logical error
Subscript out of range means you are trying to access the array variable "word" out of it's original range you declared it for.
length of word = 5
word[0] = h
word[1] = e
......
word[4] = o
word[5] = subscript error
thanks for the help. i saw that 2 days after i posted.