Hello,

This is my first posting here, so please be kind if my posting etiquette is not quite up to snuff.

I am unable to access a public variable (of type Variant) within the "Private Sub UserForm_Initialize()" procedure. I get a Run-time error '13' message. Troubleshooting this, I see that the array variable is now empty.

The goal of this in my actual vba (which is much more complicated) is to generate an array during the normal course of a Sub in Module1, and then display a userform which will populate the 2 dimensions of the array in a listbox with the contents of the array (2 columns), which displays the data to the user.

Here is a very simplified version of what I'm trying to do...

Module 1
-----------
Option Explicit
Public ARR as Variant
'--------------------------------------------------------------------------------

Sub test()

ReDim ARR(1 To 2, 1 To 3)

ARR(1, 1) = "A"
ARR(1, 2) = "B"
ARR(1, 3) = "C"
'etc...

ARR(2, 1) = "X"
ARR(2, 2) = "Y"
ARR(2, 3) = "Z"

USRFRM.Show

End Sub

UserForm>Initialize code
-----------------------------

Private Sub UserForm_Initialize()
Dim i As Integer

For i = 1 To UBound(ARR, 1)
     With USRFRM.lbLISTBOX
          .AddItem (ARR(i))
     End With
Next i

End Sub
Any help is much appreciated, as I've spent quite a bit of time googling without finding a clearcut answer.

Thanks!!!