creating a matrix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SammyB
    Recognized Expert Contributor
    • Mar 2007
    • 807

    #46
    You need to switch lines 5 and 6; on the last iteration FileName will be null.

    Comment

    • dr3amxstar
      New Member
      • May 2007
      • 55

      #47
      Originally posted by SammyB
      You need to switch lines 5 and 6; on the last iteration FileName will be null.
      Sorry for keep asking! I swop and its back to this problem

      Line2 = source2.Substri ng(n, 1)


      error: object reference not set to an instance of an object.

      Comment

      • SammyB
        Recognized Expert Contributor
        • Mar 2007
        • 807

        #48
        Originally posted by dr3amxstar
        Sorry for keep asking! I swop and its back to this problem

        Line2 = source2.Substri ng(n, 1)


        error: object reference not set to an instance of an object.
        1. Check the file
        2. What is in source2
        3. What is len(source2)
        4. What is n

        Comment

        • dr3amxstar
          New Member
          • May 2007
          • 55

          #49
          Code:
          Dim FileName As String
                  Dim Files As New List(Of String)
                  FileName = Dir("D:\project1\ANN\*Chain*")
                  Do While FileName <> ""
          
                      Files.Add(FileName)
                      ListBox1.Items.Add(Files)
          
                      FileName = Dir()
          
                  Loop
          I run this code and got this as output
          [Collection] - 13 of this

          Is this the output i should get from the few lines?

          Comment

          • dr3amxstar
            New Member
            • May 2007
            • 55

            #50
            oops.. I forgot to say a very big thank you for all the help given!!! Special Thanks to Killer42 and SammyB ! :D

            Comment

            • HelloWorldHelloWorldHello
              Banned
              New Member
              • Jun 2007
              • 8

              #51
              Your statements is very very poor.

              Comment

              Working...