Hello,
I am developing a program in Excel VBA.
My code is found in 2 places: Module1 and UserForm1.
In Module1, I have the following declarations:
Option Explicit
Public vDbaseArray2_1D() As Variant
Public vDbaseArray1_2D() As Variant
Public vIntermediate1_1D() As Variant
Public vIntermediate2_1D As Variant
Public sMatch As String
The program works perfectly.
But if I change the before-last line to:
Public vIntermediate2_1D() As Variant
the program crashes. The crash occurs on this line in UserForm1:
vIntermediate2_1D = Filter(vIntermediate1_1D, sMatch, True, vbTextCompare)
The message is:
Run-time Error '13'
Type Mismatch
I could ignore the problem since my program is working correctly, but I would like to know...
I think it is possible to declare an array with / without ().
My array is 1-dimensional.
Thanks for any help that can enlighten me, or orient me to find the reason.
Leon