Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Arrays

Arrays

Scheduled Pinned Locked Moved Visual Basic
data-structureshelpquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Catalyst500
    wrote on last edited by
    #1

    Hi can any one help me? I have got a varible length array and need to find out its length. The way I have made the array is dim Array() as string Redim Array(Varible) Thanks for any help on this.

    N S 2 Replies Last reply
    0
    • C Catalyst500

      Hi can any one help me? I have got a varible length array and need to find out its length. The way I have made the array is dim Array() as string Redim Array(Varible) Thanks for any help on this.

      N Offline
      N Offline
      numbrel
      wrote on last edited by
      #2

      By length, do you mean how many items it contains or the total number of all characters in all items in the array?

      C A 2 Replies Last reply
      0
      • N numbrel

        By length, do you mean how many items it contains or the total number of all characters in all items in the array?

        C Offline
        C Offline
        Catalyst500
        wrote on last edited by
        #3

        I mean the total number of items in the array Thanks

        1 Reply Last reply
        0
        • N numbrel

          By length, do you mean how many items it contains or the total number of all characters in all items in the array?

          A Offline
          A Offline
          Anonymous
          wrote on last edited by
          #4

          If you want to get the number of items present in the array you can use UBound(ArrName)

          1 Reply Last reply
          0
          • C Catalyst500

            Hi can any one help me? I have got a varible length array and need to find out its length. The way I have made the array is dim Array() as string Redim Array(Varible) Thanks for any help on this.

            S Offline
            S Offline
            Stephan Wright
            wrote on last edited by
            #5

            you defined your array by redim. In there you assigned the size by using the variable. I would check the variable to get the size of the array note that indexing starts at 0, so if you assign 5 to the variable, the size of the array is 6. So in general: The size of your array is "variable+1". I hope I did not missinterpret your question! :) Stephan.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups