i wrote this code to insert word from (newoutfile.txt ) which have a list of words
between brackets in (outfile.txt)
the problem is when i run it an error displyed in the first run
(subscript out of range ) pointing to this line

VB Code:
  1. word = tmp(X)
and if ii run it again for the same text and without ghanging in the code
no errors appears


why?
why in the first run there is error, but second there is no error ?