How to make an array be accessible to 3 userforms?

C

cyberdude

Hi,

I have 3 userforms (userform1, userform2, userform3) and I want to
make an common array be accessible to these 3 userforms, that is, I
can get and use any element of the common array from any one of the
userforms. May I ask how I can make it?

Mike
 
D

Doug Robbins - Word MVP

In a module, I have

Public MyArray As Variant
Sub aa()
MyArray = Split("a|b|c|d|e", "|")
End Sub

In each UserForm, to populate a ListBox1, I use

Call aa
ListBox1.List = MyArray

to populate the listbox with the contents of the array.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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