initialize an array?

D

Dave Cullen

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?
 
A

AMDRIT

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

Tom Shelton

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"}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top