initialize an array?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave Cullen

    #1

    initialize an array?

    Ii want to create an array of error messages (strings) in a module. Is
    there any way to do that without having a sub or function that assigns
    each element individually? Can the values of array contents be assigned
    when the array is declared?
  • AMDRIT

    #2
    Re: initialize an array?

    Perhaps internally you can use an arraylist, and provide a function to
    return the underlyin array?



    "Dave Cullen" <nospam@mail.co mwrote in message
    news:45BA2269.8 0B7D5FD@mail.co m...
    Ii want to create an array of error messages (strings) in a module. Is
    there any way to do that without having a sub or function that assigns
    each element individually? Can the values of array contents be assigned
    when the array is declared?

    Comment

    • Tom Shelton

      #3
      Re: initialize an array?



      On Jan 26, 8:46 am, Dave Cullen <nos...@mail.co mwrote:
      Ii want to create an array of error messages (strings) in a module. Is
      there any way to do that without having a sub or function that assigns
      each element individually? Can the values of array contents be assigned
      when the array is declared?
      sure.

      Dim messages() As String = {"one", "two", "three"}
      --
      Tom Shelton

      Comment

      Working...