Read and display specific data from text file into listbox using VB 6

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mas Juliza Alias
    New Member
    • Aug 2010
    • 67

    #16
    i have tried running the program but the result (Volume) is not accurate. i have attached the data i used and the result should be the same as in my previous post. for this text data (DATUM_0.txt), there should be 6 lines of Depth and Volume filled in the grid (Depth= -5.000, -4.000, -3.000, -2.000, -1.000, 0.000). i tried to edit your code but i fail to get the result as i described above.

    thank you for your time...
    Attached Files

    Comment

    • Guido Geurs
      Recognized Expert Contributor
      • Oct 2009
      • 767

      #17
      In Your datafile there is no line with 0.000 so it is not taken in consideration by setting up the ARRAYDATA.
      Must there always be a last line , not present in the data file?
      I suppose it will not always be 0.000 ?
      If so You will have to add it in the TextEdit window like in the next example You will have to add O.OO2 with no values?:
      ...
      ...
      0.000 > 0.001 10.0
      0.001 > 0.002 12.0
      O.OO2

      If so i must change the code because the splitting of the last line will give an error because there are no spaces in the line !!!

      Comment

      • Guido Geurs
        Recognized Expert Contributor
        • Oct 2009
        • 767

        #18
        Is it in the data input file always a constant value between the depth1's ?
        If so, I can integrate it in the code.

        Comment

        • Mas Juliza Alias
          New Member
          • Aug 2010
          • 67

          #19
          the last line of Depth column (in the new form) should be the last value of Depth2. can that be coded?

          yes, the values between the Depth1 are always constant within a single file. other files may use other constant values.

          Comment

          • Guido Geurs
            Recognized Expert Contributor
            • Oct 2009
            • 767

            #20
            I hope this will help: see attachment
            Attached Files

            Comment

            • Mas Juliza Alias
              New Member
              • Aug 2010
              • 67

              #21
              the calculated Volume at the first 3 rows are correct, but the following rows are incorrect. they appear as 156.1, 233.5, and 325.2 which they should be 157.0, 234.5, and 326.7 respectively. i went through your codes finding the calculation formula but i don't know how to edit those. sorry for my limited knowledge. can you help me on this?

              thank you for your time...

              Comment

              • MMcCarthy
                Recognized Expert MVP
                • Aug 2006
                • 14387

                #22
                I have closed this thread to further posting. Once you have received an answer to your first question you should choose the post you feel was most helpful as "Best Answer". Then ask your next question in a new thread.

                Having multiple questions in a thread is too confusing both to experts and guests looking for answers to their own questions.

                Mary

                Comment

                Working...