Oh man Quote, where do I begin? You're code structure doesn't really make sense. 1) You can't/shouldn't specify DIM without actually specifying a dimension. ie: DIM X[5] You're not using the index you could just be using VAR. (variables) for this example.