Problem with inputted file

SBGeol
05-14-2003, 04:51 PM
I have a program that reads in a txt file (using common dialog box). I have saved the data from the txt file into an array. A calculation is then prompted using a button, etc... My problem appears when I try to open another file. The calculation takes place, but some of the values from the previous file seem to have stayed and are altering the calculation...Can anybody please help me

PWNettle
05-14-2003, 05:12 PM
Well, depending on the scope of some of your variables (not known from your post) you might have some variables retaining values between calculations.

You might want to explicitly clear your calculation variables before doing a calculation to make sure they're empty. You can clear an arry with the Erase statement:

Dim ArrayVariable(10) As Variant

Erase ArrayVariable


Paul

SBGeol
05-14-2003, 05:19 PM
Well, depending on the scope of some of your variables (not known from your post) you might have some variables retaining values between calculations.

You might want to explicitly clear your calculation variables before doing a calculation to make sure they're empty. You can clear an arry with the Erase statement:

Dim ArrayVariable(10) As Variant

Erase ArrayVariable


Paul
Thanks i'll try that

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum