myArray = Array("A", "B", "C", "D", "E")
Call someSub(myArray)
...
Sub someSub(ByRef myArray() as String) 'Error here
'contents here
End Sub
Type mismatch error on that second part -- what's causing it?
Did you by any chance omit to use Option Explicit
and then went on to not specify myArray's type ? That will make it a variant and you are saying as String
which is indeed a type mismatch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With